Slide Mode shows plain text

My version of HedgeDoc is: 1.9.2, self-hosted docker-compose behind reverse proxy

What I expected to happen:

Be able to enter Slide Mode.

What actually happened:

Slide Mode shows plain text. Console shows CORS mixed active content errors.

I already tried:

  • Adding CMD_PROTOCOL_USESSL=true to docker-compose.yml environment.
    This makes Slide Mode work just fine, but then, the Edit Mode loses its connection to the backend (shows red OFFLINE button on the top-right corner) and I am unable to edit the Notes. Console shows Auth Cookie Invalid.
  • Different combinations of renewing certificates, droping database records, clearing browser caches and cookies, deleting images and rebuilding containers.

I really appreciate any orientation on how to approach a solution for this. Thanks in advance!

Hello @tao-zamorano and welcome to the HedgeDoc community!

Did you already check out our documentation regarding reverse-proxy usage?
Especially keep attention to CMD_DOMAIN being set properly.

Greetings, Erik

Thanks for the welcome and for your time.

Yes, the domain is set properly as per the nginx example in the docs. The port number env is also set to false in order to work with the reverse proxy.

Everything works just as expected, except for the Slide Mode function.

It’s funny because I can use the instance just fine by commenting and uncommenting the protocol_usessl line, and then building the docker-compose service again, as in a sort of switch for enabling and disabling Slide Mode.

Is your reverse-proxy configured to send the X-Forwarded-Proto header?

if you used Cloudflare for DNS then make sure, to disable the following item:

  • Speed > Optimization > Auto Minify
    Unchecked: HTML, CSS and JS
    Disabled: Rocket Loader

then purge cache everything (Caching>Configuration) and try it again.

I took all headers from the nginx example at https://docs.hedgedoc.org/guides/reverse-proxy/ including proxy_set_header X-Forwarded-Proto $scheme;, for both location / and location /socket.io/.

Also included the map block.

No luck after restarting nginx. I didn’t do this at first, so it may be related, but its not working after adding them.

I took the example code literally and didnt replace anything other than the server_name.

Not using Cloudflare.

Thank you guys for your help.

This is now solved. I had to rebuild the docker-compose config, my bad.