Skip to content

Help needed with fetch-based networking #1180

Answered by SuperMaxusa
chschnell asked this question in Q&A
Discussion options

You must be logged in to vote

What is meant by "CORS-enabled hosts"?

Each HTTP server can control whether the client from client's origin host (with this method and headers) can load data from that server or not. "CORS-enabled" host meant that server allows your origin host, headers and method that you use.

For example, how this looks on server's response and client's request:

// client

GET / HTTP/1.1
Host: example.com
Origin: http://someweb.site
// server that allowed CORS

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Headers: *

Server must include these headers or CORS was not permitted.

Is it at all possible to use an external relay with fetch-based network…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chschnell
Comment options

Answer selected by copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants