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

CORS errors from client side #40

Closed
alaksandarjesus opened this issue Jul 7, 2022 · 4 comments
Closed

CORS errors from client side #40

alaksandarjesus opened this issue Jul 7, 2022 · 4 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alaksandarjesus
Copy link

I am getting cors error while calling from javascript

image

@UltiRequiem UltiRequiem added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Jul 8, 2022
@UltiRequiem
Copy link
Owner

UltiRequiem commented Jul 9, 2022

Could you share your code?

fixed on

app.use(NOCORSMiddleware);

@UltiRequiem
Copy link
Owner

Try this 👇

const response = await fetch("https://joke.deno.dev")
const body = await response.json()
console.log(body)

I will make an example website using the API later ✨

@UltiRequiem UltiRequiem self-assigned this Jul 9, 2022
@UltiRequiem UltiRequiem pinned this issue Jul 9, 2022
@UltiRequiem UltiRequiem changed the title CORS error while calling from js CORS errors from client side Jul 9, 2022
@alaksandarjesus
Copy link
Author

I just tried it. If you prefer you can use the code from https://github.com/alaksandarjesus/jokes

@UltiRequiem
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants