Skip to content

Commit

Permalink
REST healthcheck endpoint does not respect CORS settings #41
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaShchienko committed Jan 16, 2020
1 parent 3f96243 commit ab69f05
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@

<oauth2:resource-server id="resourceFilter" token-services-ref="tokenServices"/>

<!-- Health check endpoint should be allowed for anyone and support cross-domain requests -->
<security:http pattern="/rest/health/**"
create-session="stateless"
entry-point-ref="oauthAuthenticationEntryPoint"
xmlns="http://www.springframework.org/schema/security">
<csrf disabled="true"/>
<cors configuration-source-ref="cuba_RestCorsSource"/>
</security:http>

<!-- Documentation endpoint should be allowed for anyone and support cross-domain requests -->
<security:http pattern="/rest/v2/docs/**"
create-session="stateless"
Expand Down Expand Up @@ -184,7 +193,8 @@

<bean id="cuba_RestExceptionLoggingFilter" class="com.haulmont.addon.restapi.api.sys.RestExceptionLoggingFilter"/>

<bean id="cuba_AnonymousAuthenticationFilter" class="com.haulmont.addon.restapi.api.auth.CubaAnonymousAuthenticationFilter"/>
<bean id="cuba_AnonymousAuthenticationFilter"
class="com.haulmont.addon.restapi.api.auth.CubaAnonymousAuthenticationFilter"/>

<bean id="cuba_RestLastSecurityFilter" class="com.haulmont.addon.restapi.api.auth.CubaRestLastSecurityFilter"/>

Expand Down

0 comments on commit ab69f05

Please sign in to comment.