mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow X-FRAME-OPTIONS to be set in config.py. Default to SAMEORIGIN. Fixes #3439
DENY cannot be supported without breaking the debugger and query tool.
This commit is contained in:
@@ -630,6 +630,11 @@ def create_app(app_name=None):
|
||||
path=config.COOKIE_DEFAULT_PATH,
|
||||
**domain)
|
||||
|
||||
# X-Frame-Options for security
|
||||
if config.X_FRAME_OPTIONS != "" and \
|
||||
config.X_FRAME_OPTIONS.lower() != "deny":
|
||||
response.headers["X-Frame-Options"] = config.X_FRAME_OPTIONS
|
||||
|
||||
return response
|
||||
|
||||
##########################################################################
|
||||
|
||||
Reference in New Issue
Block a user