Node.js Angular Universal和Express JS连接被拒绝,控制台中出现未知url错误,Http失败响应
我一直在努力让服务器端渲染工作,我已经达到了一个静态部分可以完美工作的地步,但是对于API调用,我在控制台中得到了一个HttpErrorResponse-Http失败响应,用于未知url错误,这与我在API服务器关闭时得到的错误相同。我没有为API调用使用任何相对URL,它都是带有https的绝对URLNode.js Angular Universal和Express JS连接被拒绝,控制台中出现未知url错误,Http失败响应,node.js,angular,express,ssl,Node.js,Angular,Express,Ssl,我一直在努力让服务器端渲染工作,我已经达到了一个静态部分可以完美工作的地步,但是对于API调用,我在控制台中得到了一个HttpErrorResponse-Http失败响应,用于未知url错误,这与我在API服务器关闭时得到的错误相同。我没有为API调用使用任何相对URL,它都是带有https的绝对URL HttpErrorResponse { headers: HttpHeaders { normalizedNames: Map {}, lazyUpdate: null, header
HttpErrorResponse {
headers:
HttpHeaders { normalizedNames: Map {}, lazyUpdate: null, headers: Map {} },
status: 0,
statusText: 'Unknown Error',
url: null,
ok: false,
name: 'HttpErrorResponse',
message: 'Http failure response for (unknown url): 0 Unknown Error',
error:
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: 'text',
responseURL: '',
status: 0,
statusText: '',
timeout: 0,
upload: [XMLHttpRequestUpload],
_method: 'POST',
_url: [Url],
_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: 'text',
responseURL: '',
status: 0,
statusText: '',
timeout: 0,
upload: [XMLHttpRequestUpload],
_method: 'POST',
_url: [Url],
_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 } }
我也犯了同样的错误