Skip to content

CORS missing Access-Control-Allow-Methods #771

@linonetwo

Description

@linonetwo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions