How to allow cross-domain requests with local-web-server?

25 Views Asked by At

I use local-web-server 5.3.0 to run my single page application locally:

ws --spa index.html

When the app tries to get data from a publically available URL https://www.my-domain.com/my-file.json, the request fails with:

Status 504 Gateway Timeout
Referrer Policystrict-origin-when-cross-origin

I have tried the following commands but had no success:

ws --cors.origin my-domain.com --spa index.html
ws --cors.origin www.my-domain.com --spa index.html
ws --cors.origin https://www.my-domain.com --spa index.html
ws --cors.credentials --cors.origin my-domain.com --spa index.html
ws --cors.credentials --cors.origin www.my-domain.com --spa index.html
ws --cors.credentials --cors.origin https://www.my-domain.com --spa index.html

How can I fix this?

0

There are 0 best solutions below