Missing response headers #208
Comments
Hi @damir . You need to call the headers in line with
Then you can call the the one you need. For example:
|
Hi Erny, Those are the request headers, same I pasted before when inspected the whole request object. From response (i.e. request.response) i got data, status and statusText but no response headers. |
I fixed the problem, for CORS requests Access-Control-Expose-Headers must be set both on the server and the client:
|
@damir Thanks for you, your answer is very useful. |
@damir how to solve it |
Here is the config from Rack::Cors middleware (Ruby) where custom headers are set: use Rack::Cors do
allow do
origins '*'
resource '*', :headers => :any,
:methods => [:get, :post, :options, :put, :patch],
:expose => ['X-total-count', 'X-per-page']
end
end And this is how headers look like in a raw response from server:
|
@damir can you please update your answer of header content? |
Hi all,
I need to pull some data from custom response headers but there are none. All i get is this when inspecting response:
response.headers() is also broken, it returns this:
The text was updated successfully, but these errors were encountered: