Skip to content

"Cross-Origin Request Blocked" after V2 release #215

@aarosmit

Description

@aarosmit

Describe the issue

Ever since V2 of the API went live, I receive the following error when trying to make an API request:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.pirateweather.net/forecast/key/lat,lon?extend=hourly&units=us. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.

I'm attempting to use Pirate Weather in a Svelte app and this is during testing locally, but my latest build also has the same issue. I'm making the request via Javascript's Fetch API:

let response = await fetch(`https://api.pirateweather.net/forecast/${api_key}/${latitude},${longitude}?extend=hourly&units=us`)

Please let me know if anymore information is needed.

Acknowledgements

  • I have searched this repository and Home Assistant Repository to see if the issue has already been reported.
  • I have read through the API documentation before opening this issue.
  • I have written an informative title.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions