mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #2] [CORS] No 'Access-Control-Allow-Origin' header is present on the requested resource #1
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @csells on GitHub (Aug 22, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2
Describe the bug
The following curl command works:
curl 'https://donjon.bin.sh/name/rpc.cgi?type=Party&n=10'
the equivalent command in postwoman doesn't work:
Desktop (please complete the following information):
@csells commented on GitHub (Aug 22, 2019):
BTW, the curl command also works on plain http:// but postwoman doesn't work with a http:// URL either.
@AndrewBastin commented on GitHub (Aug 22, 2019):
Umm, well its a restriction due to the CORS (Cross Origin Request Policy), there isn't a client side work around to this unless the host your trying to access should respond with the appropriate CORS headers...
More info on CORS : https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
If you really want to circumvent the CORS policies and use Postwoman you can do with Browser extensions which do so, but hey, CORS policies are a security feature hence, overriding it ain't exactly safe...
As I said there isn't like a client-side (using the browser only) way to circumvent this without extensions, although I am pretty sure you could like tunnel the request through a server hosted on the same origin (or passes the CORS headers) and make it work.
Although, anyways, I will try working on a PR which routes any request failing the CORS checks through tunneling servers (something like this or this) but they come with their own restrictions (like what to do about headers for example) and stability issues.
@abraham commented on GitHub (Aug 22, 2019):
With #15 there is now an error displayed when CORS blocks requests.
@shmurf commented on GitHub (Aug 22, 2019):
There are browser plugins that you can use to get around the CORS issue but beware, CORS is there for a reason, only use the plugin when debugging or using a site like this
Here is one such plugin
https://chrome.google.com/webstore/detail/moesif-orign-cors-changer/digfbfaphojjndkpccljibejjbppifbc?hl=en-US
@AndrewBastin commented on GitHub (Sep 30, 2019):
Assigning the issue to myself as I intend to resolve it by introducing a proxy system.
Feel free to put down any questions or any further discussion here...
@liyasthomas commented on GitHub (Sep 30, 2019):
Middleware implementation has out of the box support in Nuxt.
https://nuxtjs.org/api/pages-middleware
https://nuxtjs.org/examples/middleware
https://nuxtjs.org/guide/routing#middleware
@AndrewBastin commented on GitHub (Oct 11, 2019):
Umm, I am working on this, but I have some personal stuff coming up, so I will be focusing on that for a while (a week or so).
I am unassigning myself from this meanwhile, feel free to tackle this issue if you want.
@philBrown commented on GitHub (Nov 7, 2019):
Given the number of questions on StackOverflow that are some form of duplicate of Why does my JavaScript code get a “No 'Access-Control-Allow-Origin' header is present on the requested resource” error when Postman does not?, I don't see this as a bad thing.