Is CORS enabled on the server? Access is blocked on localhost (using JavaScript fetch)

Hi there, here's the full error: Access to fetch at 'https://api-proxy.ofcom.org.uk/broadband/coverage/{postcode}' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status. The API works great on external testing tools (e.g. Postman), and I'm including the required subscription key in the request headers. Just doesn't work in my browser. Thanks for any help!

Comments

  •  
    CORS does not appear in the headers sadly, so any requests via a browser directly to the api from a website will become invalid, so you will need to proxy the request via your server or app
    Posted by Hidden Tue, 22 Sep 2020 09:49:38 GMT


You're not signed in. Please sign-in to report an issue or post a comment.