How to solve CORS error on Reverse Proxy?

Hi there.

I am configuring a reverse proxy from blog.example.com to example.com/blog using a worker.

The WordPress website is working, but the problem is that I am getting a CORS error on example.com/blog.

However, I am not sure how to resolve this issue.

My two websites are running on Nginx servers and each has its own server block.

In the server block for example.com, I have location /blog { add_header 'Access-Control-Allow-Origin' '*'; } to the server block for example.com, but it didn’t work.

I guess I should probably set it to proxied in cloudflare, can someone give me some advice?

Thanks.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.