Symptom

If your Confluence installations runs behind a reverse-proxy or load balancer, you should make sure that both Confluence and the proxy are configured correctly. Some advanced setups, for example running a viewport on a different domain than Confluence, require that values like the URL scheme, the server name, and the server port are correctly passed to the viewport by Tomcat, the enclosing container.

PDF or Word exports from within viewports cannot be downloaded if the viewport domain is different from the Confluence base URL’s domain

Common effects of an incomplete configuration are:

  • Viewports with a custom domain name are not reachable
  • Confluence rejecting certain requests whose server name does not match the name of the host. 
    • For example: POST requests to /rest/webResources/1.0/resources that fail with a status code of 403

Learn more about how to setup custom domains and reverse proxies in Viewport.

Scroll Viewport Proxy Debugger

Scroll Viewport offers a proxy debugger UI which helps you to debug your proxy settings.

You can reach the proxy debugger via:

<confluence-base-url>/plugins/servlet/scroll-viewport/proxy-debugger

Example output

The debugger UI will output information about the following settings for example like this:

Value = the current value Viewport receives.

Expected = the value Viewport expects to receive.

KeyValueExpectedStatus
request.getSchemehttphttpMatch
request.getProtocolHTTP/1.1

request.isSecurefalsefalseMatch
request.getServerNamelocalhostlocalhostMatch
request.getServerPort80908090Match
request.getContextPath


request.getRequestURI/plugins/servlet/scroll-viewport/proxy-debugger

request.getLocalAddr0:0:0:0:0:0:0:1

request.getLocalPort8090

request.getRemoteHost0:0:0:0:0:0:0:1

request.getRemoteAddr0:0:0:0:0:0:0:1

request.getRemotePort60331

Header: accepttext/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Header: accept-encodinggzip, deflate, br

Header: accept-languageen-US,en;q=0.9,de-DE;q=0.8,de;q=0.7

Header: connectionkeep-alive

Header: hostlocalhost:8090localhost:8090Match
Header: sec-ch-ua"Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99"

Header: sec-ch-ua-mobile?0

Header: sec-fetch-destdocument

Header: sec-fetch-modenavigate

Header: sec-fetch-sitenone

Header: sec-fetch-user?1

Header: upgrade-insecure-requests1

Header: user-agentMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36