Exposed Headers

To configure the list of headers that are sent in the response to a CORS request through the Access-Control-Expose-Headers header, include a list of strings for the exposedHeaders key in your configuration. By default no headers are exposed.

Example CORS Configuration

  1. micronaut:
  2. server:
  3. cors:
  4. enabled: true
  5. configurations:
  6. web:
  7. exposedHeaders:
  8. - Content-Type
  9. - Authorization