You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
The text was updated successfully, but these errors were encountered:
I've just tested the example and it work as expected. Why is your browser sending the request to 127.0.0.1:5500 if the server is listening on port 8080?
Is there an existing issue for this?
Description
Update the URLs for /login and /logout in app.js to http://127.0.0.1:8080.
Install and configure cors middleware to resolve CORS issues.
ws version
"^8.18.0"
Node.js Version
v23.2.0
System
No response
Expected result
The POST request to /login, /logout should succeed, and the server should handle the login logic as intended.
Actual result
The server responds with a 405 Method Not Allowed error.
The browser blocks the request due to a CORS policy error
Attachments
app.js:20 POST http://127.0.0.1:5500/login 405 (Method Not Allowed)
Has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
The text was updated successfully, but these errors were encountered: