Apparently, APPLICATION_ROOT does something.
This commit is contained in:
parent
68084a84cf
commit
4eaee57076
|
@ -14,7 +14,7 @@ TESTING = environ.get('TESTING', default="false") == "true"
|
||||||
PRODUCTION = (environ.get('PRODUCTION', default="false") == "true") or (not DEVELOPMENT and not TESTING)
|
PRODUCTION = (environ.get('PRODUCTION', default="false") == "true") or (not DEVELOPMENT and not TESTING)
|
||||||
|
|
||||||
# Add trailing slash to base path
|
# Add trailing slash to base path
|
||||||
BASE_HREF = re.sub(r'//', '/', '/%s/' % environ.get('BASE_HREF', default="/").strip('/'))
|
APPLICATION_ROOT = re.sub(r'//', '/', '/%s/' % environ.get('APPLICATION_ROOT', default="/").strip('/'))
|
||||||
|
|
||||||
DB_HOST = environ.get('DB_HOST', default="localhost")
|
DB_HOST = environ.get('DB_HOST', default="localhost")
|
||||||
DB_PORT = environ.get('DB_PORT', default="5432")
|
DB_PORT = environ.get('DB_PORT', default="5432")
|
||||||
|
@ -48,5 +48,5 @@ print('TESTING = ', TESTING)
|
||||||
print('PRODUCTION = ', PRODUCTION)
|
print('PRODUCTION = ', PRODUCTION)
|
||||||
print('PB_BASE_URL = ', PB_BASE_URL)
|
print('PB_BASE_URL = ', PB_BASE_URL)
|
||||||
print('LDAP_URL = ', LDAP_URL)
|
print('LDAP_URL = ', LDAP_URL)
|
||||||
print('BASE_HREF = ', BASE_HREF)
|
print('APPLICATION_ROOT = ', APPLICATION_ROOT)
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ ma = Marshmallow(app)
|
||||||
from crc import models
|
from crc import models
|
||||||
from crc import api
|
from crc import api
|
||||||
|
|
||||||
connexion_app.add_api('api.yml', base_path=app.config['BASE_HREF'] + 'v1.0')
|
connexion_app.add_api('api.yml', base_path='/v1.0')
|
||||||
|
|
||||||
# Convert list of allowed origins to list of regexes
|
# Convert list of allowed origins to list of regexes
|
||||||
origins_re = [r"^https?:\/\/%s(.*)" % o.replace('.', '\.') for o in app.config['CORS_ALLOW_ORIGINS']]
|
origins_re = [r"^https?:\/\/%s(.*)" % o.replace('.', '\.') for o in app.config['CORS_ALLOW_ORIGINS']]
|
||||||
|
|
|
@ -32,7 +32,7 @@ def verify_token(token):
|
||||||
def get_current_user():
|
def get_current_user():
|
||||||
return UserModelSchema().dump(g.user)
|
return UserModelSchema().dump(g.user)
|
||||||
|
|
||||||
@app.route(app.config['BASE_HREF'] + 'v1.0/login')
|
@app.route('/v1.0/login')
|
||||||
def sso_login():
|
def sso_login():
|
||||||
# This what I see coming back:
|
# This what I see coming back:
|
||||||
# X-Remote-Cn: Daniel Harold Funk (dhf8r)
|
# X-Remote-Cn: Daniel Harold Funk (dhf8r)
|
||||||
|
@ -67,7 +67,7 @@ def sso_login():
|
||||||
|
|
||||||
return _handle_login(info, redirect)
|
return _handle_login(info, redirect)
|
||||||
|
|
||||||
@app.route(app.config['BASE_HREF'] + 'sso')
|
@app.route('/sso')
|
||||||
def sso():
|
def sso():
|
||||||
response = ""
|
response = ""
|
||||||
response += "<h1>Headers</h1>"
|
response += "<h1>Headers</h1>"
|
||||||
|
|
Loading…
Reference in New Issue