Nginx proxy_pass is not passing customized header into the server

in flag

I have Nginx installed on my machine and serve 2 domains.

  1. -> Frontend.
  2. -> Backend.

I'm communicating backend application through the frontend, But it's seem to be that the backend application does not receive any header from the Nginx.

This is my Nginx.conf:

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log;

events {} # event context needs to be defined to consider config valid
    include /etc/nginx/mime.types;
    server {
        listen 80;
        root /usr/share/nginx/html;

        location / {
            try_files $uri $uri/ /index.html;

    server {
        listen 80;

        location / {
            proxy_pass_request_headers      on;
            proxy_set_header Host;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Cookie $http_cookie;

The backend application except to receive 2 headers in order to get authorized PARAM_ID_AUTH and PARAM_X_AUTH.

While sending it, It's seem to be that the header does not arrive to the backend application at all.

enter image description here

I will Appreciate you help, Thanks!

br flag

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.