Microsoft Office Online Server behind reverse proxy

Robert Farley 1 Reputation point
2022-05-24T14:37:28+00:00

Hello,

How can I point all traffic/resources from the Office Online server through the reverse proxy?

I have deployed Office Online Server following Deploy Office Online Server guide. I also have integrated with the Office Online server using WOPI integration following Building a host page guide.

After calling:

Set-OfficeWebAppsFarm -ExternalURL http://office-online.<reverse-proxy>

the iframe is pointing to reverse proxy and successfully directing traffic to the Office Online server. However, it appears some of the static resources (JS, CSS) are still being directed towards the Office Online server instead of being routed through the reverse proxy.

Below is a snippet from the /hosting/discovery endpoint:

<wopi-discovery> <net-zone name="external-http"> <app name="Excel" favIconUrl="http://office-online.<reverse-proxy>/x/_layouts/resources/FavIcon_Excel.ico" bootstrapperUrl="http://<office-online-server>/x/_layouts/app_scripts/excel-boot.min.js" checkLicense="true"> <action name="view" ext="csv" default="true" urlsrc="http://office-online.<reverse-proxy>/x/_layouts/xlviewerinternal.aspx?<ui=UI_LLCC&><rs=DC_LLCC&><dchat=DISABLE_CHAT&><hid=HOST_SESSION_ID&><IsLicensedUser=BUSINESS_USER&><actnavid=ACTIVITY_NAVIGATION_ID&>"/>

This is what our built iframe looks like:

`<form action="http://office-online.<reverse-proxy>/wv/wordviewerframe.aspx?WOPISrc=http://<reverse-proxy>/path/to/wopi/files/<id>" hidden="" id="near-native-form" method="post" target="near-native-frame">
<input name="access_token" type="hidden" value="<access_token>">
<input name="access_token_ttl" type="hidden" value="0">
</form>

<iframe class="near-native__frame" id="near-native-frame" name="near-native-frame" title="Near Native Document View"></iframe>`

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
574 questions
{count} votes