mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-03 06:03:25 +00:00
transfer.sh does not support cross origin request #219
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @opoto on GitHub.
Hello
transfer.sh does not support CORS request (cross-origin request). This is needed to allow it to be used through REST API from a web page javascript. Today any Ajax request to transfer.sh from a hosted javascript is rejected by the browser.
To support CORS, it has to:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: PUT, POST, GET, OPTIONS, DELETE
Check this page to know more on CORS:
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
Thanks for this nice tool
@paolafrancesca commented on GitHub:
@opoto can you check #297 branch?
unluckiley cors middleware for gorilla mux doesn't block at all invalid CORS requests so everything is left to client side validation
@opoto commented on GitHub:
Thanks for the quick update!
Code looks good, but I don't have the environment to test. Do you have a test env I can try?
@opoto commented on GitHub:
Sorry for the confusion. But the contact link on https://transfer.sh leads to this GitHub project!
Hopefully they will deploy this patch some day!
Thanks.
@paolafrancesca commented on GitHub:
@opoto then my update won't be of any use: This project repository has no relation with the service at https://transfer.sh that's managed by https://storj.io. So far we cannot address any issue related to the service at https://transfer.sh.
I thought you were referring to a self hosted instance of the service