There was an error while loading. Please reload this page.
1 parent 3f2f1f6 commit 1418c64Copy full SHA for 1418c64
1 file changed
api_oc.py
@@ -136,8 +136,14 @@ def validateAccessToken():
136
137
# Process favicon.ico requests
138
class Favicon:
139
- def GET(self):
140
- raise web.seeother("/static/favicon.ico")
+ def GET(self):
+ is_https = (
141
+ web.ctx.env.get('HTTP_X_FORWARDED_PROTO') == 'https' or
142
+ web.ctx.env.get('HTTPS') == 'on' or
143
+ web.ctx.env.get('SERVER_PORT') == '443'
144
+ )
145
+ protocol = 'https' if is_https else 'http'
146
+ raise web.seeother(f"{protocol}://{web.ctx.host}/static/favicon.ico")
147
148
class RedirectIndex:
149
def GET(self):
0 commit comments