Redirect Host: “data/forward_scheme must be equal to one of the allowed values” when selecting Auto scheme
Checklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker image?- Yes
- Are you sure you're not using someone else's docker image?
- Yes
- Have you searched for similar issues (both open and closed)?
- Yes
Describe the bug When editing a Redirect Host, selecting “Auto” as the Scheme causes an error message:
data/forward_scheme must be equal to one of the allowed values
The redirect cannot be saved. Choosing http or https works correctly, so the issue seems to be that the “Auto” option is not being accepted as a valid value.
Nginx Proxy Manager Version 2.13.1
To Reproduce Steps to reproduce the behavior:
- Go to “Hosts” → “Redirect Hosts”.
- Create or edit a redirect entry.
- Set Scheme to Auto.
- Try saving the configuration.
- The error message appears.
Expected behavior “Auto” scheme should be accepted or removed from the dropdown if not supported, to avoid confusion.
Screenshots
can you update für the lastest version because i can't reproduce it
domain -> domain.de schme -> auto forward -> domain1.de
for me it works
Hi @lastsamurai26, I'm testing with the latest version, and sorry, but I made a mistake when creating the issue. This error doesn't occur when creating, it only occurs when editing.
Result of changing schme: http > https = ok https > http = ok http > auto = error https > auto = error
When creating a new entry, the value "auto" is written to the database. However, it should be "$SCHEME".
Duplicate of #4692
I've fixed this differently, by using auto for the UI and db column and rendering $scheme in the nginx config.
The reason for this: I don't like the idea of having this value being set in the nginx config directly from database data without any validation. I also don't like using dollar variables as values.