feat: respect x-* headers for redirections (#9054)
This commit is contained in:
parent
240b66d737
commit
c0b71f8286
4 changed files with 21 additions and 0 deletions
10
api/extensions/ext_proxy_fix.py
Normal file
10
api/extensions/ext_proxy_fix.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from flask import Flask
|
||||
|
||||
from configs import dify_config
|
||||
|
||||
|
||||
def init_app(app: Flask):
|
||||
if dify_config.RESPECT_XFORWARD_HEADERS_ENABLED:
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app)
|
||||
Loading…
Add table
Add a link
Reference in a new issue