Nginx Canonical Header Not Being Included

As the threads title suggests, the canonical header that I am adding via Nginx isn’t being included in the response header from Cloudflare. I’ve tried multiple things and it should work but I’m not understanding why it’s not working. Here is my code below.

    location ~ ^/en/ {
        add_header Link "<https://domain.com/en/>" always;
        add_header Link "rel=canonical" always;
        try_files $uri $uri/ /index.php?req=$uri&$args;
    }

This can be closed. I ended up adding a header from within my application which is working. So I’ve removed the nginx code from my config.

1 Like