Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS missing Access-Control-Allow-Methods #771

Closed
linonetwo opened this issue Jun 12, 2023 · 0 comments · Fixed by #775
Closed

CORS missing Access-Control-Allow-Methods #771

linonetwo opened this issue Jun 12, 2023 · 0 comments · Fixed by #775

Comments

@linonetwo
Copy link

linonetwo commented Jun 12, 2023

Description

I'm trying to fetch a local resource using Fetch API

const mjsContent = await fetch(mjsPluginUrl, {
        headers: {
          // doing cors request to mjs file
          'Access-Control-Allow-Origin': '*',
        },
      }).then(async response => await response.text());

get

OPTIONS	http://localhost:56494/dist/index.mjs 200 OK
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Disposition: inline; filename="index.mjs"
Accept-Ranges: bytes
ETag: "bec056ae652582ae5b356ce71636ecf51562c477"
Content-Type: application/javascript; charset=utf-8
Vary: Accept-Encoding
Content-Encoding: gzip
Date: Mon, 12 Jun 2023 08:43:04 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked

Body:

 CORS Missing Allow Header 

Library version

14.2.0

Node version

v18.12.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant