Symptoms
When working with the on-prem deployment of Allure TestOps, the end user could only select ‘http’ in the ‘Servers’ section of the Swagger (Generated server URL), instead of ‘https,’ which the end users use to connect to the UI.
This results in the functionality not working as expected.
The most likely cause of the issue
Most likely the issue is caused by incorrect settings in the reverse proxy configuration as Swagger determines the server’s URL dynamically based on the Host and X-Forwarded-Proto headers.
So, you need to check, if your reverse proxy configured in a way it passes the proto information to the service backend.
Possible solution
Check the reverse proxy config, fix the config.
Nginx example
Check if the directive proxy_set_header X-Forwarded-Proto or similar is available in the reverse proxy config.
If it is not available, then complete the reverse proxy config with the parameter you can see below and restart the reverse proxy to apply the changes.
location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article