1. What is the issue? Please be detailed.
I have been setting up the ODK instance behind a proxy to allow other application to co-exist inside the same server. Now, ODK is working, but the upstream settings has been failing me today.
I cant get to even login though the ODK interface is loading when requested from the browser.
2. What steps can we take to reproduce this issue?
To reproduce this: You might need to have:
Nginx (Docker container)
Latest Central
Certbot (For SSL)
3. What have you tried to fix the issue?
I tweaked all the headers as much as I could:
I tried port 444 when forwarding and it went through.
So ODK returns: {"message": "This authentication method is only available over HTTPS","code": 401.3}
What should I do to resolve this, since currrently, all I can do is to comment that out and it works fine. But that’s not sustainable in the long run.
You could try adding the x-forwarded-proto: 'https' header to your reverse proxies and see if that solves the issue. ODK recently changed its authentication ruleset and now requires HTTPS, which interferes with reverse proxies that do not have this header.
If that doesn’t work (for some reason), the nuclear option is to just comment out the new code found in lib/http/preprocessors:
If you comment out lines 102 and 103 above, this will give you back access to the server over HTTP in my testing.
Hello! Thank you for that guide, it was a life saver for me .
I added the corresponding header in nginx proxy_set_header X-Forwarded-Proto https, but it didn’t work. The rest of the configuration file is almost the same as in the guide, except for lines added by Certbot when I configured the SSL certificates.
In the post you shared, you said that the problem arose when you updated from v2025.2 to v2025.3. In my case, the problem started when I updated from v2025.3.1 to v2025.4.0, so maybe those are different issues.
For now I just wiped my entire ODK instance and installed v2025.3.1 again, because for now I’m just testing, so wiping everything out is not a problem.
I will try to comment those lines of code you mention when I update again. Thank you!
PS: I changed the configuration of nginx in my VPS, maybe I need to change a configuration in central-nginx?
Hello. Thanks for this and your guide.
I did all that as well and nothing seemed to work. As of now I have just commented out the problematic code and the ODK is functioning, though it is not something that I should’ve done.
So, I am still inclined towards a much more sustainable solution.
@Jonas_George I agree; it would be nice to have a maintainable solution for those hosting behind proxies!
When/if I get more of an opportunity to dig into the application logic, I’ll see if I can debug why the httpsOnly() call is being applied when x-forwarded-for is being properly set. It’s a strange one.
I got the same problem. I updated from v2025.3.1 as I try to keep my ODK up-to-date all the time. I’m using nginx as a reverse proxy.
I solved the problem by using @jniles nuclear option and comment out those two lines, and rebuild the solution.
I also, just for curiosity I added some logging into the context.protocol and the context.headers['x-forwarded-proto'] and this are the values:
service-1 | Protocol: undefined
service-1 | Headers forwarded: http
I edited my NGINX proxy multiple times, adding different headers, but in the end was always “undefined” and “http”. This is my current setup of my reverse proxy.