CORS issue #11
Unanswered
emulienfou
asked this question in
Q&A
Replies: 2 comments 5 replies
-
Hello David. I think you call some your endpoint (like localhost:7000/getContent) from client side and get this error?
Best wishes,
Vlad
… 28 окт. 2021 г., в 15:22, David Sanchez ***@***.***> написал(а):
Hi there!
Didn't want to open an issue, since I do not know if it's a bug or not.
I currently use Next.js, on server (NodeJS) side, everything works has expected.
However on client side, I received this error message:
Access to XMLHttpRequest at 'https://example.atlassian.net/wiki/rest/api/content?spaceKey=AA&expand=ancestors,body.view,descendants.page' from origin 'http://localhost:3001' 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.
I also use your other library jira.js and it works properly on client side.
Maybe this is related to a configuration to Axios, or something else.
Do you have any idea what the problem could be?
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#11>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACOZ3OAF57BOHTFSXMVCOE3UJE57PANCNFSM5G4X6VWQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
2 replies
-
And I think this article will be helpful for you: https://nextjs.org/docs/api-routes/api-middlewares |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
Didn't want to open an issue, since I do not know if it's a bug or not.
I currently use Next.js, on server (NodeJS) side, everything works has expected.
However on client side, I received this error message:
Access to XMLHttpRequest at 'https://example.atlassian.net/wiki/rest/api/content?spaceKey=AA&expand=ancestors,body.view,descendants.page' from origin 'http://localhost:3001' 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.
I also use your other library jira.js and it works properly on client side.
Maybe this is related to a configuration to Axios, or something else.
Do you have any idea what the problem could be?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions