Nginx proxy_set_header Referer doesn't seem to work?

Plex server version 4.62.1

I’m trying to remove the warning Request came in with unrecognized domain / IP 'x' in header Referer; treating as non-local by rewriting the header in Nginx.

Here’s my nginx config:

server {
    server_name plex.<fqdn>;
    location / {
        proxy_pass http://172.16.0.152:32400;
        proxy_buffering off;
        sub_filter ',news,' ',';
        sub_filter_once on;
        sub_filter_types text/xml;
        proxy_http_version 1.1;
        proxy_read_timeout 36000s;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        proxy_set_header X-Plex-Client-Identifier $http_x_plex_client_identifier;
        proxy_set_header X-Plex-Device $http_x_plex_device;
        proxy_set_header X-Plex-Device-Name $http_x_plex_device_name;
        proxy_set_header X-Plex-Platform $http_x_plex_platform;
        proxy_set_header X-Plex-Platform-Version $http_x_plex_platform_version;
        proxy_set_header X-Plex-Product $http_x_plex_product;
        proxy_set_header X-Plex-Token $http_x_plex_token;
        proxy_set_header X-Plex-Version $http_x_plex_version;
        proxy_set_header X-Plex-Nocache $http_x_plex_nocache;
        proxy_set_header X-Plex-Provides $http_x_plex_provides;
        proxy_set_header X-Plex-Device-Vendor $http_x_plex_device_vendor;
        proxy_set_header X-Plex-Model $http_x_plex_model;
        proxy_set_header        Host                      172.16.0.152;
        proxy_set_header        Referer                   172.16.0.152;
        proxy_set_header        Origin                    172.16.0.152;
    }
}

However, the headers still appear to be set:

Request: [172.16.0.2:3342 (Allowed Network (Subnet))] GET /status/sessions/background (12 live) TLS GZIP Signed-in Token (Makeshift) / Accept => application/xml / Accept-Encoding => gzip, deflate, br / Accept-Language => en-GB / Cache-Control => no-cache / Connection => keep-alive / DNT => 1 / Host => 172-16-0-152.x.plex.direct:32400 / Origin => https://plex.<fqdn> / Pragma => no-cache / Referer => https://plex.<fqdn>/ / sec-ch-ua => "Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92" / sec-ch-ua-mobile => ?0 / Sec-Fetch-Dest => empty / Sec-Fetch-Mode => cors / Sec-Fetch-Site => cross-site / User-Agent => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 / X-Plex-Client-Identifier => h33n8hwla8t1vcccr48y9h1f / X-Plex-Device => Windows / X-Plex-Device-Name => Chrome / X-Plex-Device-Screen-Resolution => 1712x449,1920x1200 / X-Plex-Features => external-media,indirect-media / X-Plex-Language => en-GB / X-Plex-Model => bundled / X-Plex-Platform => Chrome / X-Plex-Platform-Version => 92.0 / X-Plex-Product => Plex Web / X-Plex-Sync-Version => 2 / X-Plex-Token => xxxxxxxxxxxxxxxxxxxx / X-Plex-Version => 4.62.1

I’ve also tried setting the headers to http://172.16.0.152:32400 to no avail.

What am I doing wrong here?

Thanks!

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