mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an error on exit caused by the cookie path patch.
This commit is contained in:
parent
3bd9bdad61
commit
4942c938ac
@ -148,7 +148,6 @@ if __name__ == '__main__':
|
||||
# Reference:
|
||||
# https://github.com/pallets/werkzeug/issues/220#issuecomment-11176538
|
||||
try:
|
||||
|
||||
app.run(
|
||||
host=config.DEFAULT_SERVER,
|
||||
port=server_port,
|
||||
@ -158,8 +157,7 @@ if __name__ == '__main__':
|
||||
),
|
||||
threaded=config.THREADED_MODE
|
||||
)
|
||||
from pgadmin.utils.paths import get_cookie_path
|
||||
|
||||
config.COOKIE_DEFAULT_PATH = get_cookie_path()
|
||||
|
||||
except IOError:
|
||||
app.logger.error("Error starting the app server: %s", sys.exc_info())
|
||||
|
@ -541,6 +541,15 @@ def create_app(app_name=None):
|
||||
app.logger.info('Registering blueprint module: %s' % module)
|
||||
app.register_blueprint(module)
|
||||
|
||||
|
||||
#########################################################################
|
||||
# Set cookie path
|
||||
#########################################################################
|
||||
@app.before_first_request
|
||||
def before_first_request():
|
||||
from pgadmin.utils.paths import get_cookie_path
|
||||
config.COOKIE_DEFAULT_PATH = get_cookie_path()
|
||||
|
||||
##########################################################################
|
||||
# Handle the desktop login
|
||||
##########################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user