rezarahiminia / free-api-worldcup2022

Grab your football API data for FIFA World Cup 2022 competition!
239 stars 35 forks source link

CORS error #46

Closed cyrusDev1 closed 1 year ago

cyrusDev1 commented 1 year ago

Access to fetch at 'http://api.cup2022.ir/api/v1/bydate' from origin 'null' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

cyrusDev1 commented 1 year ago

@raminmr

bassil-97 commented 1 year ago

I have the same issue

viniciusbaccin commented 1 year ago

Same issue here @raminmr

yuriGrando commented 1 year ago

@raminmr me too

rezarahiminia commented 1 year ago

Access to fetch at 'http://api.cup2022.ir/api/v1/bydate' from origin 'null' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Are you calling directly through the website?

rezarahiminia commented 1 year ago

@raminmr me too

Are you calling directly through the website?

cyrusDev1 commented 1 year ago

@raminmr me too

Are you calling directly through the website?

I used axios to make the request from the api

cyrusDev1 commented 1 year ago

it works fine on postman but not in browser

rezarahiminia commented 1 year ago

My Brother You must call through the service server. You cannot call the service through the web.

cyrusDev1 commented 1 year ago

What can i do?

Brenno-Ribeiro commented 1 year ago

@raminmr

How connetion in service server.

irlanviana commented 1 year ago

@raminmr How can I connect through the service server?

sp1z commented 1 year ago

How are you all trying to connect? If you're just clicking the link in a browser that won't work, you'll need to use some sort of JSON API library.

irlanviana commented 1 year ago

@sp1z through Axios

bassil-97 commented 1 year ago

I’ve tried to call the api from localhost (react app) through axios (I am using a web token also) , but CORS error is showing up saying that I cannot send requests from localhost to the api‫أُرسلت من الـ iPhone‬‫في ١٢‏/١١‏/٢٠٢٢ الساعة ٢:٠٧ م، كتب/كتبت ‏Irlan Viana @.***>:‬ @sp1z through Axios

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

The content of this email and its attachments and any views or opinions presented in this email are solely those of the sender and do not represent those of the Yarmouk University. Also, the recipient should check this email and any attachments for the presence of viruses. Yarmouk University will not accept any liability in respect of such communication or any damage caused by any virus transmitted by this email or its attachments, and the sender will be personally liable for any damages or other liability arising.

©Yarmouk University, Irbid-Jordan www.yu.edu.jo

rezarahiminia commented 1 year ago

You must call through the service server. You cannot call the service through the web.

If you want to call the service directly. support me I will give you access to your address 🤪

ahocevar99 commented 1 year ago

What exactly does it mean to call through the service server?