Closed Kmilka closed 4 years ago
Hi @Kmilka, the LotR cannot be used with a browser. Please use a REST API Client, like Postman, Postwoman, Insomnia or any other client that let's you include an authorization header to use your bearer token. For further information please refer to the documentation: https://the-one-api.herokuapp.com/documentation
Hi! Thanks for your API - cool stuff.
But I can't use it in Chrome and Mozilla (latest versions) because of the CORPS policy.
You can retrieve more info from the console log. Copy:
Access to fetch at 'https://the-one-api.herokuapp.com/v1/character/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
As I get it the server response is missing the following property: Access-Control-Allow-Origin: * The GET request with an API key is not a simple request in Chrome, so the browser blocks it.