DarrenOfficial/dpaste

CORS problems make this unusable via javascript

beyarkay opened this issue · 2 comments

Description

Currently I can't fetch a paste that I POST to dpaste because the CORS header's aren't set to allow any origin. It would be amazing if I could POST a paste to dpaste, and then access that paste from a website I'm building.

Acceptance Criteria

This would be fixed if I can go into my browser and execute:

fetch('https://dpaste.org/KQn3b')

And not get an error message like:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dpaste.org/KQn3b. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.

Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource. 

Hello, I've added a CORS header set to allow any origin.

Please check if that resolved the issue for you.

Thanks so much!