Closed Spaier closed 5 years ago
Url is absolute: https://localhost:44300/api/ClientConfiguration
(via ServerInterceptor
). https://httpbin.org/get worked. Prerendering works with anything but localhost.
Have you tried running as http instead of https? The self-signed cert may be causing issue.
I had the same issue due to SSL. One option is to ignore these errors by adding this to your main.server.ts file:
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
I have the same error, is there any solution to fix it? (SSR doesn't work when I try to get data from back-end on server)
Thanks for contacting us. We're closing this issue as this doesn't align with our long-term plans in this area. You can read more details about our vision for this area at https://github.com/aspnet/AspNetCore/issues/12890.
Http request to any localhost url crashes angular app with server-side rendering. Calling external api or calling localhost without prerendering works.
UPD: It works in production environment, but still crashes in dev environment with localhost.
Expected behavior: Application works
Current behavior: API isn't called, angular app crashes.
Nodejs: 8.11.3 or 10.7.0 Yarn: 1.7.0 AspNetCore: 2.1.2, IIS Express or Console aspnet-prerendering: 3.0.1 Angular: 6.0.9 Angular CLI: 6.0.8 Visual studio 2017 Community 15.7.5 Windows 10 Pro x64
app.browser.module.ts
configuration.service.ts
app.server.module.ts
server.interceptor.ts
main.aspnetcore.ts
angular.json
Error