Rename SERVER_NAME to SERVER_HOSTNAME to fix the subdomain routing problems.
This commit is contained in:
parent
8fac0474b5
commit
14fba3ae7c
5 changed files with 10 additions and 9 deletions
|
@ -30,7 +30,7 @@ def logs_init_builder(level=logging.DEBUG,
|
|||
|
||||
# The set of configuration key names that will be accessible in the client. Since these
|
||||
# values are set to the frontend, DO NOT PLACE ANY SECRETS OR KEYS in this list.
|
||||
CLIENT_WHITELIST = ['SERVER_NAME', 'PREFERRED_URL_SCHEME', 'GITHUB_CLIENT_ID',
|
||||
CLIENT_WHITELIST = ['SERVER_HOSTNAME', 'PREFERRED_URL_SCHEME', 'GITHUB_CLIENT_ID',
|
||||
'GITHUB_LOGIN_CLIENT_ID', 'MIXPANEL_KEY', 'STRIPE_PUBLISHABLE_KEY',
|
||||
'ENTERPRISE_LOGO_URL']
|
||||
|
||||
|
@ -57,7 +57,7 @@ class DefaultConfig(object):
|
|||
SEND_FILE_MAX_AGE_DEFAULT = 0
|
||||
POPULATE_DB_TEST_DATA = True
|
||||
PREFERRED_URL_SCHEME = 'http'
|
||||
SERVER_NAME = 'localhost:5000'
|
||||
SERVER_HOSTNAME = 'localhost:5000'
|
||||
|
||||
# Mail config
|
||||
MAIL_SERVER = ''
|
||||
|
|
|
@ -1485,7 +1485,8 @@ def get_pull_credentials(robotname):
|
|||
return {
|
||||
'username': robot.username,
|
||||
'password': login_info.service_ident,
|
||||
'registry': '%s://%s/v1/' % (app.config['PREFERRED_URL_SCHEME'], app.config['SERVER_NAME']),
|
||||
'registry': '%s://%s/v1/' % (app.config['PREFERRED_URL_SCHEME'],
|
||||
app.config['SERVER_HOSTNAME']),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ TYPE_CONVERTER = {
|
|||
}
|
||||
|
||||
PREFERRED_URL_SCHEME = app.config['PREFERRED_URL_SCHEME']
|
||||
SERVER_NAME = app.config['SERVER_NAME']
|
||||
SERVER_HOSTNAME = app.config['SERVER_HOSTNAME']
|
||||
|
||||
|
||||
def fully_qualified_name(method_view_class):
|
||||
|
@ -143,7 +143,7 @@ def swagger_route_data(include_internal=False, compact=False):
|
|||
swagger_data = {
|
||||
'apiVersion': 'v1',
|
||||
'swaggerVersion': '1.2',
|
||||
'basePath': '%s://%s' % (PREFERRED_URL_SCHEME, SERVER_NAME),
|
||||
'basePath': '%s://%s' % (PREFERRED_URL_SCHEME, SERVER_HOSTNAME),
|
||||
'resourcePath': '/',
|
||||
'info': {
|
||||
'title': 'Quay.io API',
|
||||
|
@ -160,7 +160,7 @@ def swagger_route_data(include_internal=False, compact=False):
|
|||
"implicit": {
|
||||
"tokenName": "access_token",
|
||||
"loginEndpoint": {
|
||||
"url": "%s://%s/oauth/authorize" % (PREFERRED_URL_SCHEME, SERVER_NAME),
|
||||
"url": "%s://%s/oauth/authorize" % (PREFERRED_URL_SCHEME, SERVER_HOSTNAME),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -205,7 +205,7 @@ class BuildTriggerActivate(RepositoryParamResource):
|
|||
path = url_for('webhooks.build_trigger_webhook',
|
||||
repository=repository_path, trigger_uuid=trigger.uuid)
|
||||
authed_url = _prepare_webhook_url(app.config['PREFERRED_URL_SCHEME'], '$token', token.code,
|
||||
app.config['SERVER_NAME'], path)
|
||||
app.config['SERVER_HOSTNAME'], path)
|
||||
|
||||
final_config = handler.activate(trigger.uuid, authed_url,
|
||||
trigger.auth_token, new_config_dict)
|
||||
|
|
|
@ -482,12 +482,12 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
|
||||
var config = window.__config;
|
||||
config.getDomain = function() {
|
||||
return config['SERVER_NAME'];
|
||||
return config['SERVER_HOSTNAME'];
|
||||
};
|
||||
|
||||
config.getUrl = function(opt_path) {
|
||||
var path = opt_path || '';
|
||||
return config['PREFERRED_URL_SCHEME'] + '://' + config['SERVER_NAME'] + path;
|
||||
return config['PREFERRED_URL_SCHEME'] + '://' + config['SERVER_HOSTNAME'] + path;
|
||||
};
|
||||
|
||||
config.getValue = function(name, opt_defaultValue) {
|
||||
|
|
Reference in a new issue