#How do I get an header forwarded by nginx?

15 messages · Page 1 of 1 (latest)

jovial echo
#

How would I do that?

desert hound
jovial echo
#

not from an internal request, I want to get the headers of the browser request for the webpage, you know?

desert hound
jovial echo
#

I tried this method before and it did not work

desert hound
#

Have you tried to add the correct headers to the useFetch?

const { data } = await useFetch('http://ip-api.com/json/?fields=49393', {
  headers: {
    'X-Real-I': '...'
  }
});
jovial echo
#

I may have explained this wrong

#

basicially I just need to get the ip adress of the visitor (of my page)

#

to then display the location

desert hound
jovial echo
#

how would I print just the value of the useRequestHeaders(...)?

#

like only the header value, without name and stuff