Skip to content

Commit 1641a26

Browse files
committed
Use https assets + update CORS with prod cdn url
1 parent 76de831 commit 1641a26

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

api/MyApp/AppHost.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public override void Configure(Container container)
1717
});
1818

1919
Plugins.Add(new SharpPagesFeature());
20-
//#if DEBUG
21-
Plugins.Add(new CorsFeature(allowOriginWhitelist:new[]{ "http://localhost:3000" }));
22-
//#endif
20+
Plugins.Add(new CorsFeature(allowOriginWhitelist:new[]{
21+
"http://localhost:3000", "https://nextjs-gh.web-templates.io" }));
2322
}
2423
}

ui/next.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; // when it works https://github.com/vercel/next.js/issues/21537
88
rules.push({
99
source: '/api/:path*',
10-
destination: 'http://localhost:5000/json/reply/:path*',
10+
destination: 'http://localhost:5000/api/:path*',
1111
});
1212
}
1313
return rules;
@@ -18,5 +18,5 @@ module.exports = {
1818
},
1919

2020
// Use the CDN in production and localhost for development.
21-
assetPrefix: isProd ? 'http://nextjs-gh.web-templates.io' : '',
21+
assetPrefix: isProd ? 'https://nextjs-gh.web-templates.io' : '',
2222
}

0 commit comments

Comments
 (0)