Getting "Unauthorized WOPI host" error

I have configured a Collabora Online instance using Docker and integrated it with my ASP.NET Core (Blazor) application. The goal is to enable in-browser editing of Microsoft Word documents using Collabora via the WOPI protocol.

The backend WOPI endpoints are functioning correctly — I’m able to retrieve document metadata and content (e.g., /wopi/files/{id}, /wopi/files/{id}/contents) successfully via tools like Swagger or direct HTTP calls.

However, when attempting to load the document within the Collabora editor embedded in an <iframe> on the Blazor frontend, I receive the following error:

Unauthorized WOPI host. Please try again later and report to your administrator if the issue persists.

It seems the request reaches the Collabora instance, but fails due to WOPI host validation. The WOPISrc used in the iframe matches the backend host (e.g., http://localhost:5169/wopi/files/{id}), and I have added the relevant hostnames (localhost, host.docker.internal) to the <wopi> section in coolwsd.xml. SSL is also disabled via --o:ssl.enable=false.

What could be causing the WOPI host to be rejected despite being properly registered in coolwsd.xml, and how can I resolve this issue to allow document editing in the browser?

Hello @Chandrayog

When Collabora “rejects” your WOPI iframe with

Unauthorized WOPI host. Please try again later …

it almost always comes down to the fact that the Host header (and/or the public URL) that Collabora actually sees does not exactly match one of the entries you put in your coolwsd.xml

• Check the actual Host header in the container logs
• Add that exact host[:port] to …
• (Optionally) set <public_url> to your iframe’s base URL
• Mount the updated file into /etc/loolwsd/coolwsd.xml and restart

Once the Host header that Collabora sees lines up with an entry in your list (or with your public_url), the “Unauthorized WOPI host” error will go away and your document will load inside the iframe.

you can also checkout the doctNet integration example here as well : collabora-online-sdk-examples/webapp/dotNET at master · CollaboraOnline/collabora-online-sdk-examples · GitHub

Thanks
Darshan