---
title: "Swimburger - Blog - WebAPI"
description: "Swimburger.net is a blog about .NET, cloud, web development, and whatever comes across Swimburger's plate. Swimburger.net is run by Niels Swimberghe."
canonical: "https://swimburger.net/blog/webapi"
---

[

<picture><img class="blog-post-card__image" src="/cdn-cgi/image/width=250,format=auto,quality=90,height=250,fit=cover,gravity=0.5x0.5002459542608448/media/ggrmwooo/dotnet-yarp-square.png" srcset="/cdn-cgi/image/width=250,format=auto,quality=90,height=250,fit=cover,gravity=0.5x0.5002459542608448/media/ggrmwooo/dotnet-yarp-square.png 250w, /cdn-cgi/image/width=375,format=auto,quality=90,height=375,fit=cover,gravity=0.5x0.5002459542608448/media/ggrmwooo/dotnet-yarp-square.png 375w, /cdn-cgi/image/width=500,format=auto,quality=90,height=500,fit=cover,gravity=0.5x0.5002459542608448/media/ggrmwooo/dotnet-yarp-square.png 500w" sizes="250px" width="250" height="250" alt=".NET Bot building an application" decoding="async" loading="lazy" style="background-color:#fff"></picture>

## Use project Tye to host Blazor WASM and ASP.NET Web API on a single origin to avoid CORS

2/14/2021 - .NET

Using Microsoft's experimental Project Tye, you configured the proxy to forward requests to '/api' to the Web API, and all other requests to the Blazor WASM client.



](/blog/dotnet/use-project-tye-to-host-blazor-wasm-and-aspdotnet-web-api-on-a-single-origin)[

<picture><img class="blog-post-card__image" src="/cdn-cgi/image/width=250,format=auto,quality=90,height=250,fit=cover,gravity=0.5x0.5/media/3cxh1whu/dotnet-yarp-square.png" srcset="/cdn-cgi/image/width=250,format=auto,quality=90,height=250,fit=cover,gravity=0.5x0.5/media/3cxh1whu/dotnet-yarp-square.png 250w, /cdn-cgi/image/width=375,format=auto,quality=90,height=375,fit=cover,gravity=0.5x0.5/media/3cxh1whu/dotnet-yarp-square.png 375w, /cdn-cgi/image/width=500,format=auto,quality=90,height=500,fit=cover,gravity=0.5x0.5/media/3cxh1whu/dotnet-yarp-square.png 500w" sizes="250px" width="250" height="250" alt=".NET Bot building an application" decoding="async" loading="lazy" style="background-color:#fff"></picture>

## Use YARP to host client and API server on a single origin to avoid CORS

1/24/2021 - .NET

Using Microsoft's new reverse proxy "YARP", you configured the proxy to forward requests to '/api' to the Web API, and all other requests to the Blazor WASM client.



](/blog/dotnet/use-yarp-to-host-client-and-api-server-on-a-single-origin)
