HTTPS breaks SSR api calls
I use starter, and in production i have error fail: Microsoft.AspNetCore.NodeServices[0] ERROR Response { _body: ProgressEvent { type: 'error', target: XMLHttpRequest { onloadstart: null, onprogress: null, onabort: null, onerror: null, onload: null, ontimeout: null, onloadend: null, _listeners: [Object], onreadystatechange: null, _anonymous: undefined, readyState: 4, response: null, responseText: '', responseType: '', responseURL: '', status: 0, statusText: '', timeout: 0, upload: [Object], _method: 'GET', _url: [Object], _sync: false, _headers: [Object], _loweredHeaders: [Object], _mimeOverride: null, _request: null, _response: null, _responseParts: null, _responseHeaders: null, _aborting: null, _error: null, _loadedBytes: 0, _totalBytes: 0, _lengthComputable: false }, currentTarget: XMLHttpRequest { onloadstart: null, onprogress: null, onabort: null, onerror: null, onload: null, ontimeout: null, onloadend: null, _listeners: [Object], onreadystatechange: null, _anonymous: undefined, readyState: 4, response: null, responseText: '', responseType: '', responseURL: '', status: 0, statusText: '', timeout: 0, upload: [Object], _method: 'GET', _url: [Object], _sync: false, _headers: [Object], _loweredHeaders: [Object], _mimeOverride: null, _request: null, _response: null, _responseParts: null, _responseHeaders: null, _aborting: null, _error: null, _loadedBytes: 0, _totalBytes: 0, _lengthComputable: false }, lengthComputable: false, loaded: 0, total: 0 }, status: 0, ok: false, statusText: '', headers: Headers { _headers: Map {}, _normalizedNames: Map {} }, type: 3, url: null }
Hey there, what are you trying to do?
Hi, I built everything on your starter, when posting on iis everything works well with http but on https there is such a bug, and there are no tags in the page code (description, title) and this page impression is simply rendered to un universally when switching back to http all the data is what can be? mayby transferHttp not working in this mode
Hi Im not sure if this is related, but when you turn https on the SSR API-calls break.
@lgoudriaan yes, with ssr and https api rendering does not work correctly
Ah found the same error in the server output. Maybe change the issue title to: HTTPS breaks SSR api calls
@lgoudriaan did not find a way to fix it?
Nope :( just found out that https broke the api calls. I also don't know how to debug this.
What's the actual response on the server? Are you including the ANTI-CSRF cookies as well on the call? or are you just doing a get/post directly from postman?
@rufogongora its just the normal response, but it's not executed on the server.
With the new version (angular 5+) the api call is executed twice, 1 via server, 1 via client.
cors didnot help
i find solution! ssr starts on random port, so it has different baseUrl than our localhost. for example web api serve on http://localhost:5000 and https://localhost:5001 and our ssr served on http://localhost:56789(for example). so our ssr calls request like this: http://localhost:56789/api/fetch. so it is not our web api. we make shure that we call api by our dedicated localhost:5000 or localhost:5001. and everything will work. i'll publish my own repo soon