Problem
When opening an HTTP service via the Portal, the following error is displayed:
502 Bad Gateway
The following error is displayed in the network log of the browser's development tools (F12):
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://url-to-http-service. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 502.
Cause
The most likely cause is that the CORS header is not configured.
Solution
To resolve this problem, configure the CORS header in the webserver on the device behind the StrideLinx router. Contact the manufacturer of the device If it is not possible to make changes to the webserver yourself.
The HTTP service does not modify the CORS header, because this would override the security policy configured on the webserver. Therefore, the HTTP service simply forwards the headers from the source without modifying them.