I created a self-hosted redash instance on AWS and enabled SSL.
I can already connect the instance via https.
However, the URLs displayed in the example API call section begin with “http://” instead of “https://”.
how can I replace “http” to “https” in Example API Calls?
I want to prevent non-technical staff from making mistakes.
Welcome to the forum! This ought to happen automatically, since the API call URL’s on the query screen are generated using Flask’s built-in url_for function. How did you enable SSL?
【The steps I enabled SSL】
After creating an instance using the official AMI(ami-060741a96307668be), I ran the following article.
In brief, There are follows three steps.
step1. Create nginx.conf
step2. Change nginx image configuration in docker-compose.yml to use nginx.conf of step1
step3. Run the certbot command
Is there some environment variable that you forgot to change?
Got it thanks. When you see the http example calls on the query screen, are you visiting with https? Flask should automatically pick up the protocol scheme from the browser request. So if you visit https then all its URLs will be https also. But if you visit from http they will be http.
Typically you’ll enforce an nginx rule that redirects all http traffic to https.
Regarding V8: you can upgrade your existing installation to V10 quite easily. We strongly recommend this as V8 is no longer supported and there are CVE’s which have been patched already in V10.
After that, I wonder if modifying this line to include x_proto=1 will fix the issue. I’m getting that by looking at the Werkzeug documentation for ProxyFix. By default, it won’t honour the protocol setting passed in from nginx which may be the root cause of the issue. Although it’s strange we haven’t seen this issue crop up in the past.
Regarding V8: you can upgrade your existing installation to V10 quite easily. We strongly recommend this as V8 is no longer supported and there are CVE’s which have been patched already in V10.
Thank you, I have updated to v10.1.0.
I had just built the environment and forgot to update.
After that, I wonder if modifying this line 2 to include x_proto=1 will fix the issue.
I have tried adding it, but the result seems to be the same.
I will post a screenshot.