Skip to content

Mr browser says this project is blocked by CORS policy #85

Open
@ghost

Description

It says:

Access to fetch at 'file://.../node_modules/argon2-browser/dist/argon2.wasm' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, brave, chrome-untrusted, https.
argon2.js:91 GET file:///.../node_modules/argon2-browser/dist/argon2.wasm net::ERR_FAILED
loadWasmBinary @ argon2.js:91
loadModule @ argon2.js:41
argon2Hash @ argon2.js:167
309 Error: TypeError: Failed to fetch
at loadWasmBinary (argon2.js:91:16)
at loadModule (argon2.js:41:23)
at Object.argon2Hash [as hash] (argon2.js:167:16)

I really don't want to have to use live server for testing my project if at all possible... Can this be fixed?

I'm testing on brave (fork of chromium).

EDIT:

Using the bundled version seemed to fix it. But also there's also a typo in your readme, the file is:

    <script src="node_modules/argon2-browser/dist/argon2-bundled.min.js"></script>

not:

    <script src="node_modules/argon2-browser/dist/argon2-bundled.js"></script>

(Also just my personal opinion but why would someone prefer the non-bundled version? Id list the bundled one first).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions