We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using localhost:8080, we get the below errors when sending a POST to /login and /register
localhost:8080
POST
/login
/register
@Guergeiro Also mentioned we get CORs problems when using 127.0.0.1:*
127.0.0.1:*
Figure out a solution to this to fix the errors.
Errors (in console)
Access to XMLHttpRequest at 'http://localhost:1667/users' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. actions.js:118 Registration unsuccessful. xhr.js:175 POST http://localhost:1667/users net::ERR_FAILED dispatchXhrRequest @ xhr.js:175 xhrAdapter @ xhr.js:18 dispatchRequest @ dispatchRequest.js:40 Promise.then (async) request @ Axios.js:64 Axios.<computed> @ Axios.js:88 wrap @ bind.js:11 eval @ actions.js:108 register @ actions.js:107 wrappedActionHandler @ vuex.esm.js:840 dispatch @ vuex.esm.js:478 boundDispatch @ vuex.esm.js:361 eval @ Register.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue- loader-options:73 Promise.then (async) onSubmit @ Register.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib?? vue-loader-options:72 submit @ Register.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader- options!./node_modules/vue-loader/lib??vue-loader-options:44 invokeWithErrorHandling @ vue.js:1888 invoker @ vue.js:2219 original._wrapper @ vue.js:7510 actions.js:119 Uncaught (in promise) TypeError: Cannot read property 'data' of undefined at eval (actions.js:119)
The text was updated successfully, but these errors were encountered:
Might have to implement the OPTIONS method. I wonder if axios does a preflight check before it does the actual POST.
Sorry, something went wrong.
I believe, this is something that we need to handle in Drash itself... If we add a simple middleware that accepts any origin, should work, right?
That's a good point. Didn't think about that. Could work.
@Guergeiro feel free to take this issue on 😆
No branches or pull requests
When using
localhost:8080
, we get the below errors when sending aPOST
to/login
and/register
@Guergeiro Also mentioned we get CORs problems when using
127.0.0.1:*
Figure out a solution to this to fix the errors.
Errors (in console)
The text was updated successfully, but these errors were encountered: