mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Rename some internal environment variables that could conflict with Kubernetes. Fixes #4999.
This commit is contained in:
@@ -129,15 +129,15 @@ if config.DEBUG:
|
||||
# runtime if we're running in desktop mode, otherwise we'll just use the
|
||||
# Flask default.
|
||||
PGADMIN_RUNTIME = False
|
||||
if 'PGADMIN_PORT' in globals():
|
||||
if 'PGADMIN_INT_PORT' in globals():
|
||||
app.logger.debug(
|
||||
'Running under the desktop runtime, port: %s',
|
||||
globals()['PGADMIN_PORT']
|
||||
globals()['PGADMIN_INT_PORT']
|
||||
)
|
||||
server_port = int(globals()['PGADMIN_PORT'])
|
||||
server_port = int(globals()['PGADMIN_INT_PORT'])
|
||||
PGADMIN_RUNTIME = True
|
||||
elif 'PGADMIN_PORT' in os.environ:
|
||||
port = os.environ['PGADMIN_PORT']
|
||||
elif 'PGADMIN_INT_PORT' in os.environ:
|
||||
port = os.environ['PGADMIN_INT_PORT']
|
||||
app.logger.debug(
|
||||
'Not running under the desktop runtime, port: %s',
|
||||
port
|
||||
@@ -154,11 +154,11 @@ else:
|
||||
app.PGADMIN_RUNTIME = PGADMIN_RUNTIME
|
||||
|
||||
# Set the key if appropriate
|
||||
if 'PGADMIN_KEY' in globals():
|
||||
app.PGADMIN_KEY = globals()['PGADMIN_KEY']
|
||||
app.logger.debug("Desktop security key: %s" % app.PGADMIN_KEY)
|
||||
if 'PGADMIN_INT_KEY' in globals():
|
||||
app.PGADMIN_INT_KEY = globals()['PGADMIN_INT_KEY']
|
||||
app.logger.debug("Desktop security key: %s" % app.PGADMIN_INT_KEY)
|
||||
else:
|
||||
app.PGADMIN_KEY = ''
|
||||
app.PGADMIN_INT_KEY = ''
|
||||
|
||||
# Output a startup message if we're not under the runtime and startup.
|
||||
# If we're under WSGI, we don't need to worry about this
|
||||
|
||||
Reference in New Issue
Block a user