VisualizeJS CORS issues can be overwhelming and difficult to debug. This article provides some ordered steps that you can follow to help debug the issue :
- The first thing to start with is to ensure that the domain calling your JRS from VisJS is on the domainWhiteList profile attribute in Server settings. If it’s not, add it as : domainWhiteList1, domainWhiteList2…. the value must be equal to the origin value in the cors browser error.
- Make sure there's no other CorsFilter in Tomcat/JRS web.xml
- Make sure that the headers is sending are on the allowed headers and OPTIONS method is allowed in AppContext-security-pro-web.xml
- If using a Proxy, make sure the proxy is allowing the HTTP OPTIONS method.
- Enable logging for the Spring’s default CORS filter :
- Open <path-to-tomcat>/webapps/jasperserver-pro/WEB-INF
/log4j2.properties file and Add next lines (somewhere below root logger definition rootLogger.level=ERROR or in the end of the file):
- logger.defaultCorsProcessor.name=org.springframework.web.cors.DefaultCorsProcessor
- logger.defaultCorsProcessor.level=TRACE
- logger.defaultCorsProcessor.appenderRef.stdout.ref=stdout
- logger.defaultCorsProcessor.appenderRef.rolling.ref=fileout
Also, try testing your calls from outside via Jsfiddle or a standalone HTML page to check if the issue is coming from the client app or the Server/Proxy area.
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now