Problem

After installing CORS the Single Sign On no longer works :

you are getting the following message after being redirected to the Application

Cross-Origin Resource Sharing (CORS) Filter: CORS origin denied

Solution


Add the URL of the Identity Provider to the CORS Configuration


<!-- ==================== CORS configuration ====================== -->
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
<init-param>
<param-name>cors.allowOrigin</param-name>
<param-value>https://jira-test.2improveit.eu https://idp.2improveit.eu</param-value> <!-- use http: or https: depending on your configuration -->
</init-param>
<init-param>
<param-name>cors.supportedMethods</param-name>
<param-value>GET, POST, HEAD, OPTIONS, PUT, DELETE</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CORS</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>