ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developersโ€ข13mo agoโ€ข
22 replies
Sodium

Facing CORS error while enabling I AM UNDER ATTACK MODE

TITLE: CORS Error While Security Set To I Am Under Attack

I am trying to setup cloudflare on my web application
I have two domains -
dev.app.com
dev.app.com
and
api.app.com
api.app.com


On enabling "I am under attack" in my CloudFlare, I start getting CORS errors -
Access to api.app.com from origin from dev.app.com has been blocked due to missing access-control-allow-origin header.
Access to api.app.com from origin from dev.app.com has been blocked due to missing access-control-allow-origin header.


I implemented
CORS
CORS
headers in my Java API backend
My
api.app.com
api.app.com
domain now has
Access-Control-Allow-Origin: https://dev.app.com
Access-Control-Allow-Origin: https://dev.app.com
header setup.

Why am I still facing error? What is the solution?
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Under attack mode
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
about under attack mode
Cloudflare DevelopersCDCloudflare Developers / general-help
2mo ago
Cloudflare Under attack mode
Cloudflare DevelopersCDCloudflare Developers / general-help
3y ago
Under attack mode blocking api
Cloudflare DevelopersCDCloudflare Developers / general-help
10mo ago