2

When the React app. is loaded, I am able to get the query param from the current page's url through `window.location.search'. Similarly, I want to read the request headers. How to read the request headers in React?

MAK
  • 1,915
  • 4
  • 20
  • 44

1 Answers1

2

It's not possible to get request headers of the page in React, without sending a http request via javascript.

Refer answers:
https://stackoverflow.com/questions/44354763/how-do-i-get-http-headers-in-react-js
How can I read the current headers without making a new request with JS?

Bensu Rachel
  • 184
  • 1
  • 5