Skip to content
New issue

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

[Bug]: CORS Error #1327

Open
parhamsagharchi opened this issue Jun 25, 2023 · 9 comments
Open

[Bug]: CORS Error #1327

parhamsagharchi opened this issue Jun 25, 2023 · 9 comments
Assignees
Labels

Comments

@parhamsagharchi
Copy link

parhamsagharchi commented Jun 25, 2023

Relevant scope

Frontend specs

Description

Hi,

I have been using these APIs for my interview task, I faced a CORS error with this endpoint POST /api/users.

Also, I checked on your demo website, but unfortunately, I won't register my user with that website.

could you fix this problem?

Thank You,
Parham

@geromegrignon
Copy link
Contributor

Hi Parham. The API was down. I fixed it.
You should not face CORS issues by design. Feel free to tell me if there is still an issue.

Is using RealWorld a requirement for the interview? I'm curious as not having that much information about how the API is used outside of the project itself.

@parhamsagharchi
Copy link
Author

Thank You,

I check again and I didn't catch any errors such as CORS.

@sarinaa-m
Copy link

Hi
I having the same issue and when I want to call POST /api/users I get CORS error

would you mind help me.

@geromegrignon
Copy link
Contributor

Hi @sarinaa-m, can you share the full error message?

@sarinaa-m
Copy link

yes of course
Capture1

@geromegrignon
Copy link
Contributor

geromegrignon commented Dec 21, 2023

I only see the failure, please share the error message explaining that's a cors error

@sarinaa-m
Copy link

is it ok?
Capture2

@sarinaa-m
Copy link

thank you for answering my question
but I fixed it
I added withCredentials: true, to my axios config, and when I removed it, it worked.

@geromegrignon
Copy link
Contributor

Happy that's fixed on your side!
The API is allowing any origin intentionally.

@geromegrignon geromegrignon reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants