Closed mujz closed 7 years ago
I agree, but it doesn't belong in this module. There are two problems with that code above in general:
I think it is reasonable that anyone who uses a cors module would realize they want to expose this header and configure their cors module to do so.
Great response! Thanks a lot for the explanation!
This is definitely debatable, but in my opinion, X-Response-Time header should be added to the
Access-Control-Expose-Headers
header. My rationale for this is that if somebody is using this package, they are explicitly asking you to expose theX-Response-Time
header, therefore, you need to explicitly tell the browser that this header is safe. This can be done with one line of code: