G
G
gromyko212021-05-10 10:16:38
JavaScript
gromyko21, 2021-05-10 10:16:38

Is it possible to get request headers and ip of the user who sent it via js?

Is it possible to get the headers of the request (about the user) and his ip through js? Should js only act as a front?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vadimparinov, 2021-05-10
@vadimparinov

Well, as one of the options

const request = axios.post('http://localhost/', data);
request.then((response)=>{
  console.log(response.headers);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question