efforthye / etherscat_block_explorer_react

personal geth project / etherscan : https://etherscan.io/
2 stars 0 forks source link

Geth CORS Error #9

Open efforthye opened 1 year ago

efforthye commented 1 year ago

Access to XMLHttpRequest at 'http://localhost:8081/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

efforthye commented 1 year ago
app.use(
    cors({
        origin: "http://localhost:3000",
        credentials: true
    }),
);