-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
BlazorSource - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcblazor/subsvcsupport-request
Description
[EDIT by guardrex to fix the code formatting. @mariovh87 ... FYI ... it's triple-backticks above and below for code blocks in issue comments.]
Description
In a WebApp project, I need the static files in App.razor, including the Blazor startup section:
<link href="main.css" rel="stylesheet"/>
<script src="_framework/blazor.web.js" autostart="false"></script>
<script>
Blazor.start({
webAssembly: {
loadBootResource: function (type, name, defaultUri, integrity) {
console.log(`Loading: '${type}', '${name}', '${defaultUri}', '${integrity}'`);
switch (type) {
case 'dotnetjs':
case 'dotnetwasm':
case 'timezonedata':
case 'assembly':
return `https://EP-custom-cdn.azurefd.net/_framework/${name}`;
}
}
}
});
</script>I want the CDN URL to be configurable via an environment variable in appsettings.json for production purposes.
How can this be done?
Page URL
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/fundamentals/static-files.md
Document ID
25458428-030f-6acb-457e-1b4dfa722043
Article author
Metadata
- ID: b0af7f84-f8dd-92d9-dacd-2aab76d3a039
- PlatformId: 88af5647-85fa-eaf4-cbe1-4d0d4fdf521b
- Service: aspnet-core
- Sub-service: blazor
Metadata
Metadata
Assignees
Labels
BlazorSource - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcblazor/subsvcsupport-request
Type
Projects
Status
Done