Table of Contents |
---|
...
Info |
---|
"Access to fetch at ‘https://confluence.your_company_domain.com/rest/api/content’ from origin ‘http://jira.your_company_domain.com’ has been blocked" or "Network error or CORS is not configured on your Confluence instance" |
... it's because Cross-Origin Resource Sharing (CORS) is not enabled for your Confluence Server as result the requests which are coming from Jira are not accepted.
To overcome please follow the instructions below
- Stop Confluence server
- Navigate to your confluence home directory (Usually for Linux: /opt/atlassian/confluence/)
- Open confluence_home_directory/confluence/WEB-INF/
- Backup web.xml
- Open web.xml for editing
Add the flowing code block after the last <filter>...</filter>.
Info Please replace "https://jira.your_company_domain.com" to your confluence URL.
Code Block linenumbers true <filter> <filter-name>CorsFilter</filter-name> <filter-class >org.apache.catalina.filters.CorsFilter</filter-class > <init-param> <param-name>cors.allowed.origins</param-name> <param-value>https://jira.your_company_domain.com</param-value> </init-param> <init-param> <param-name>cors.allowed.methods</param-name> <param-value>OPTIONS,GET,POST,PUT,DELETE</param-value> </init-param> <init-param> <param-name>cors.exposed.headers</param-name> <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value> </init-param> <init-param> <param-name>cors.allowed.headers</param-name> <param-value>X-Atlassian-Token,Authorization, Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value> </init-param> <init-param> <param-name>cors.support.credentials</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>CorsFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
- Save changes
- Start Confluence server and make sure that the server has been successfully started. If no, restore web.xml from backup
...
Confluence Space to shortlist the parent pages
Parent page - any selected page within the Space defined
Page title - you can define a custom name of use some of our release/package variables to include in the naming. If such name already exists we will create a new version of the document.
Click “Export“.
Navigating to Confluence
...