mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix fatal error on launch of pgAdmin4. Fixes #4298
This commit is contained in:
parent
8851cb0704
commit
9fdf68d559
@ -92,6 +92,7 @@ def index():
|
|||||||
# A special URL used to "ping" the server
|
# A special URL used to "ping" the server
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@blueprint.route("/ping")
|
@blueprint.route("/ping")
|
||||||
|
@pgCSRFProtect.exempt
|
||||||
def ping():
|
def ping():
|
||||||
"""Generate a "PING" response to indicate that the server is alive."""
|
"""Generate a "PING" response to indicate that the server is alive."""
|
||||||
return "PING"
|
return "PING"
|
||||||
@ -129,6 +130,7 @@ def explain_js():
|
|||||||
# A special URL used to shut down the server
|
# A special URL used to shut down the server
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@blueprint.route("/shutdown", methods=('get', 'post'))
|
@blueprint.route("/shutdown", methods=('get', 'post'))
|
||||||
|
@pgCSRFProtect.exempt
|
||||||
def shutdown():
|
def shutdown():
|
||||||
if config.SERVER_MODE is not True:
|
if config.SERVER_MODE is not True:
|
||||||
func = request.environ.get('werkzeug.server.shutdown')
|
func = request.environ.get('werkzeug.server.shutdown')
|
||||||
|
Loading…
Reference in New Issue
Block a user