Cors blocking using Cloud Flare workers #3315
rogeriopavan
started this conversation in
General
Replies: 1 comment
-
Hello @pavandasilva, A typical request should include the origin header, e.g.: This is the header which the cors middleware checks. The request in your screenshot doesn't have this header. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I add the code above to allow localhost access to my worker, and its worker well.
Now i trying use my next.js website deployed in the cloudFlare pages and i add cors policy:
But its not working. And i received BLOCK BY CORS POLICY.
![image](https://private-user-images.githubusercontent.com/26095712/360899286-02cba01f-d8a8-497a-badd-9d8736f23471.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyODM1MDcsIm5iZiI6MTczOTI4MzIwNywicGF0aCI6Ii8yNjA5NTcxMi8zNjA4OTkyODYtMDJjYmEwMWYtZDhhOC00OTdhLWJhZGQtOWQ4NzM2ZjIzNDcxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE0MTMyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlNTI4YmIyZTQwOTQwY2YzOTJjZGJiMGQ5NzU0NWIyZGZlNDhlYWI3OTA3ODk0MDJiMjI1ODEzNjc4ZGJhMjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oibB_HyTCKDOC_HHBguqRdMyEPKYemB5F9dGvv-ER1k)
Beta Was this translation helpful? Give feedback.
All reactions