question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

History API CORS issue

See original GitHub issue

I’ve just moved my tileboard to a different server and noticed that all API calls to history are failing.

Access to XMLHttpRequest at 'http://192.168.1.2:8123/api/history/period/2020-07-01T11:22:05.828Z?end_time=2020-07-02T11:22:05.828Z&filter_entity_id=person.marina' from origin 'http://192.168.1.30' 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.

@akloeckner did you expirience anything similar?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:35 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
rchlcommented, Jun 28, 2022

This appears to have been fixed in Home Assistant. It should now work as long as the origin that is making the request is whitelisted in HA configuration.yaml. For example:

http:
  cors_allowed_origins:
    - http://localhost:8080
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cross-Origin Resource Sharing (CORS) - MDN Web Docs
The CORS mechanism supports secure cross-origin requests and data transfers between browsers and servers.
Read more >
Troubleshoot CORS errors from API Gateway - AWS
Cross-Origin Resource Sharing (CORS) errors occur when a server doesn't return the HTTP headers required by the CORS standard. To resolve a CORS ......
Read more >
CORS errors and how to solve them - Topcoder
Or, your API fails and shows a CORS error in the console. · This happens because the same-origin policy is part of the...
Read more >
What Is a CORS Error and How to Fix It (3 Ways) - Bannerbear
As a CORS error occurs when the external API server doesn't return the HTTP headers required by the CORS standard, you can add...
Read more >
3 Ways to Fix the CORS Error — and How the Access-Control ...
Fix one: install the Allow-Control-Allow-Origin plugin. The quickest fix you can make is to install the moesif CORS extension .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found