kopale.
kopale.
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
No description
16 replies
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
@lycian Thank you for taking the time to create an example 🙂 , I'm going to try it again later today
16 replies
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
Jesus... the Azure documentation to put it lightly is so scattered all around. I tired bunch of configs, none of seems to work. Later I tried Cloudflare Pages and its working. You have to create and set '_headers' file (just paste this):
/*
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
/*
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Deploy and boom it is working as expected. Still I would like to host it on Azure, can anybody help? Thank you 🙂
16 replies
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
Like in my example on local im serving/"hosting" the app via dotnet serve
16 replies
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
So there is no "host" in my code so I cant set cors there, thats why im tinkering in staticwebapp.config.json file
16 replies
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
Thank you but like i said the host is the azure static web app, so i cant set cors in code because it is served by a file server (in my case azure) https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-9.0#standalone-deployment
16 replies
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
i have to configured at there somehow
16 replies
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
Oh the app is blazor wasm and its not hosted, like no kestrel, the azure static web app serves the app
16 replies
CC#
Created by kopale. on 12/16/2024 in #help
Azure Static Web App (Blazor) problem with CORS
Eeeh, I thought setting the json file is going to be enough. I just deployed the app used that config file. Where should I set that? This is my first time using azure 😅 .
16 replies