I am very new to web programming and I am trying to get the headers of the Preflight request. I have a server with node in javascript, from the server I serve an html. I need to retrieve the response headers in the html.
In the html to obtain the response headers of any request I use the following code:
fetch(signedRequest.url, {
method: signedRequest.method,
headers: signedRequest.headers,
body: body
})
.then(response => {
console.log('Response headers: ', response.headers);
});
However, I don’t know how I can get the headers response from the Preflight request since I don’t know where it is generated, can someone help me please?
I’m sorry if it’s an obvious question but I’m starting on web.