mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2025-12-06 05:32:03 +01:00
24 lines
537 B
JavaScript
24 lines
537 B
JavaScript
const { env } = require('process');
|
|
|
|
const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` :
|
|
env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:20486';
|
|
|
|
const PROXY_CONFIG = [
|
|
{
|
|
// <8. Add proxy for Blazor app>
|
|
context: [
|
|
"/weatherforecast",
|
|
"/_framework",
|
|
"/_content",
|
|
],
|
|
// </8. Add proxy for Blazor app>
|
|
target: target,
|
|
secure: false,
|
|
headers: {
|
|
Connection: 'Keep-Alive'
|
|
}
|
|
}
|
|
]
|
|
|
|
module.exports = PROXY_CONFIG;
|