2

In my app, there are 3 different nginx server containing 3 different container - Legacy, API and React. Now the issue is for React, I have already added the header - Referrer-Policy: strict-origin-when-cross-origin in the react config file of nginx under docker.

But how and where can I test that the header Referrer-Policy: strict-origin-when-cross-origin has been added?

I tried using fetch API inside App.tsx file, but it is unable to read header response. showing blank.

componentDidMount() {
        fetch( "<API>")
            .then((res) => console.log(res.headers))
    }

O/P: Headers{}

So can some one suggest me how can I read the response header particularly for react container?

ch_Soumili
  • 21
  • 7
  • 1
    May be this one helpful for you : https://stackoverflow.com/questions/52132258/how-do-i-add-hsts-headers-to-my-nginx-react-app-on-app-engine-flex – Manoj Joshi Nov 08 '22 at 06:12
  • I already check this. Here it is mentioned that how can i add but i actually need how can i test the header. – ch_Soumili Nov 08 '22 at 06:14

0 Answers0