Skip to content

Commit ab94bad

Browse files
author
Kareem Zidane
committed
checking CS50_IDE_TYPE
1 parent d0e18fb commit ab94bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cs50/flask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _execute_after(*args, **kwargs):
4444

4545
# When behind CS50 IDE's proxy, ensure that flask.redirect doesn't redirect from HTTPS to HTTP
4646
# https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#module-werkzeug.middleware.proxy_fix
47-
if getenv("C9_HOSTNAME") and not getenv("IDE_OFFLINE"):
47+
if getenv("CS50_IDE_TYPE") == "online":
4848
try:
4949
import flask
5050
from werkzeug.middleware.proxy_fix import ProxyFix

0 commit comments

Comments
 (0)