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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDY3MTEsIm5iZiI6MTczOTEwNjQxMSwicGF0aCI6Ii8yNjA5NTcxMi8zNjA4OTkyODYtMDJjYmEwMWYtZDhhOC00OTdhLWJhZGQtOWQ4NzM2ZjIzNDcxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEzMDY1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM3NzQ5NzQ1ZGNkZmExYjVkMTBiYzJmYWQ2NjllODcxNDFhMjcwZWU5YTcxNDY4Zjg3YmU3M2E0ZWVjZGY1MTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1QeLYWh87lJjCMmm2PRvYOeT8sc78LJwlU5sF6MYqEA)
Beta Was this translation helpful? Give feedback.
All reactions