Hoppscotch: GET on my Glitch API doesn't work

Created on 22 Aug 2019  路  4Comments  路  Source: hoppscotch/hoppscotch

Describe the bug
A simple GET request on http://aashutoshrathi.glitch.me/api/self/gh gives the error

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://liyasthomas.github.io/postwoman/
  2. Select Method as "GET"
  3. URL as http://aashutoshrathi.glitch.me
  4. And Path as /api/self/gh
  5. Then send a request.

Expected behavior

It should result in response same as http://aashutoshrathi.glitch.me/api/self/gh

Screenshots

image

duplicate

Most helpful comment

Use https:// instead of http://.

Here is a screenshot from when I ran it using https://:
Screen Shot 2019-08-22 at 5 51 22 PM

Here is a comment about http not working right now: link to comment

All 4 comments

Use https:// instead of http://.

Here is a screenshot from when I ran it using https://:
Screen Shot 2019-08-22 at 5 51 22 PM

Here is a comment about http not working right now: link to comment

Possible duplicate of #2.
CORS is a server side security policy feature which blocks API calls from any non-HTTPS requests.

I think I should close it then.

This is not a CORS issue, but rather a Mixed Content issue. An XMLHttpRequest or fetch() request is considered "active content"; "mixed active content" such as a XMLHttpRequest or fetch() to an http:// URL from an https:// URL has been blocked by default since Firefox 23 and is also blocked by Chrome.

In this case, both URLs provide the same CORS headers:

< access-control-allow-origin: *
< access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept

Also, CORS does not block cross-origin requests: the same-origin policy prevents them by default, and CORS headers can be used to opt-in to allowing them.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jgroom33 picture jgroom33  路  5Comments

liyasthomas picture liyasthomas  路  4Comments

wafeishushu picture wafeishushu  路  3Comments

AtomicNicos picture AtomicNicos  路  3Comments

edisonaugusthy picture edisonaugusthy  路  5Comments