remove localhost

This commit is contained in:
diminator 2017-03-22 13:07:30 +01:00
parent a3b01147e5
commit 94b5318e52
No known key found for this signature in database
GPG Key ID: C3D8590E6D0D439A

View File

@ -61,15 +61,7 @@ def create_app(*, debug=False, threads=4):
app = Flask(__name__) app = Flask(__name__)
hostname = os.environ.get('DOCKER_MACHINE_IP', 'localhost')
if not hostname:
hostname = 'localhost'
origins = ('^(https?://)?(www\.)?({}|0|0.0.0.0|'
'localhost|127.0.0.1)(\.com)?:\d{{1,5}}$').format(hostname),
CORS(app, CORS(app,
origins=origins,
headers=( headers=(
'x-requested-with', 'x-requested-with',
'content-type', 'content-type',
@ -82,8 +74,7 @@ def create_app(*, debug=False, threads=4):
'cookie', 'cookie',
'session-id', 'session-id',
), ),
supports_credentials=True, supports_credentials=True)
)
app.debug = debug app.debug = debug