Skip to content

Custom headers emptying the headers map #173

@Malex

Description

@Malex

I need to use in my application a custom header in response to a getList (header is totalElements).
It is correctly set by the backend, but of course in restangular the headers map only cointained the "default allowed" ones. For that reason I added Access-Control-Exposed-Headers. It is correctly returned, as per the following response, but after this change restangular does not populate the headers map entries


Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:4200
Access-Control-Expose-Headers: total-elements
Cache-Control: no-cache
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Wed, 10 Jul 2019 09:22:29 GMT
ETag: W/"d94-6ITA2YnKbkbSYtyM0pSSIrU0koc"
Expires: -1
Pragma: no-cache
total-elements: 13
Transfer-Encoding: chunked
Vary: Origin, Accept-Encoding
X-Powered-By: Express

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions