Skip to content

CORS with allowedOriginPatterns and allowCredentials #117

Closed Answered by ch4mpy
gunhol asked this question in Q&A
Discussion options

You must be logged in to vote

There are properties to define allowed origins, headers and methods, as well as exposed headers, per path matcher:

  • com.c4-soft.springaddons.security.cors for OAuth2 resource servers
  • com.c4-soft.springaddons.security.client.cors for OAuth2 clients

Sample usage in the BFF tutorial. Please note that this configuration is not necessary when accessing both the API and the Angular app through the gateway, in which case all requests share the same origin, but providing such configuration enables direct access to the API (or access through the gateway from a client which is served aside of it).

If you need more flexibility, please open a ticket to expose how and why (use case), or just expose a…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by gunhol
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