Skip to content

The X-Total-Count header is missing in the HTTP Response #102

Answered by fernandocanizo
vaheeds asked this question in Q&A
Discussion options

You must be logged in to vote

I haven't tested this, so try it and give us feedback please: you should add in the cors options the X-Total-Count in the exposedHeaders field.

Then to actually send the header with the page count, in the controller you should add a

res.setHeader("X-Total-Count", `${pageCount}`);

Also, I don't know about your react-admin thingy, but check if it accepts Total-Count as recommended by RFC 6648.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vaheeds
Comment options

Answer selected by hagopj13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants