Unable to Preview Office Documents After Upgrading to Confluence 5.7.x Because of NGINX Cache Configuration
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
After upgrading to Confluence 5.7.x, user is unable to preview Office Documents (.docx, .xlsx, .pptx) attached in the page.
診断
環境
- Confluence is running behind NGINX Proxy
Diagnostic Steps
- Try attaching new Office Documents file and preview it. This should work, otherwise this article may not be applicable.
- Try to preview the Office Documents in all browser to see if it's browser related issue.
- Compare the properties of problematic attachment and working attachment. If the properties are different, then this article may not be applicable.
原因
The new File Previewer is will be looking for content cache to display the Office Documents. In this case, NGINX Proxy doesn't allow caching.
ソリューション
Add the following configuration in NGINX cache configuration:
...
set $do_not_cache 0;
if ($request_uri ~* ^(/secure/admin|/plugins|/rest).*) {
set $do_not_cache 1;
}
proxy_cache_bypass $do_not_cache;
...