The CORS proxy is an edge-apps-scripts command now

Start the local CORS proxy with edge-apps-scripts cors-proxy instead of pointing at cors-proxy-server.ts inside the library, and it follows redirects for GET and HEAD requests.

The local CORS proxy has its own command:

{
  "scripts": {
    "cors-proxy-server": "edge-apps-scripts cors-proxy"
  }
}

It still listens on 0.0.0.0:8080 by default, and HOST and PORT change that. Put the target URL after the proxy's address, as before: http://localhost:8080/https://api.example.com/feed.

The proxy also follows redirects now. When an API answers a GET or HEAD request with a 301 to 308, the proxy fetches the new location and returns that response to your app, up to 10 redirects deep. After 10 it stops and returns a 508 with Too many redirects. Other methods get the redirect response itself, unchanged.

If this affects you: the file cors-proxy-server.ts is gone from the package. If your package.json runs it directly, replace that script with edge-apps-scripts cors-proxy as shown above.

Put Screenly on your screens

Book a demo and we will walk you and your IT team through it, or start a free trial on a screen you already have.