[java-identity-provider] branch main updated: IDP-1907 - Enable Spring MVC's CORS-handling features
Henri Mikkonen
henri.mikkonen at iki.fi
Thu Mar 3 17:54:01 UTC 2022
This is an automated email from the git hooks/post-receive script.
hjmikkon pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=57dc154d62774ecb35653ae5e7400d576492395f
The following commit(s) were added to refs/heads/main by this push:
new 57dc154d6 IDP-1907 - Enable Spring MVC's CORS-handling features
57dc154d6 is described below
commit 57dc154d62774ecb35653ae5e7400d576492395f
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Thu Mar 3 19:53:02 2022 +0200
IDP-1907 - Enable Spring MVC's CORS-handling features
https://shibboleth.atlassian.net/browse/IDP-1907
Inject shibboleth.CorsConfiguration bean to the FlowHandlerMapping. If the
bean is null / non-existing, the behaviour should remain as before injecting
the bean. If it's set, it's supposed to be a map of CorsConfigurations.
For instance:
<util:map id="shibboleth.CorsConfigurations" value-type="org.springframework.web.cors.CorsConfiguration">
<entry key="/oidc/userinfo">
<bean class="org.springframework.web.cors.CorsConfiguration"
p:allowedOrigins="http://localhost:8080,http://localhost:8081"
p:allowedMethods="GET,POST"
p:allowedHeaders="Authorization"
p:maxAge="1800" />
</entry>
</util:map>
The keys in the map correspond to the locations under the <context>/profile URL space.
---
idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
index 00119bd4c..49bce3584 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/mvc-beans.xml
@@ -25,7 +25,7 @@
</bean>
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping" p:order="0"
- p:flowRegistry-ref="flowRegistry">
+ p:flowRegistry-ref="flowRegistry" p:corsConfigurations="#{getObject('shibboleth.CorsConfigurations')}">
<property name="flowUrlHandler">
<bean class="net.shibboleth.idp.profile.support.PathInfoSupportingFlowUrlHandler"
p:supportedFlows="#{getObject('shibboleth.RESTFlows') ?: getObject('shibboleth.DefaultRESTFlows')}" />
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list