import os, logging
from flask import Flask
from raven.contrib.flask import Sentry

app = Flask(__name__)

app.config.from_object(os.environ.get('SETTINGS'))

app.logger.debug("\nConfiguration\n%s\n" % app.config)

# Sentry exception reporting
if 'SENTRY_DSN' in os.environ:
    sentry = Sentry(app, dsn=os.environ['SENTRY_DSN'])

if not app.debug:
    app.logger.addHandler(logging.StreamHandler())
    app.logger.setLevel(logging.INFO)

# Validate config
for property_to_check in ['CASEWORK_URL', 'CHECK_URL']:
	if not app.config[property_to_check]:
		raise Exception('Missing %r configuation property.' % (property_to_check))


import os, logging
from flask import Flask
from raven.contrib.flask import Sentry

app = Flask(__name__)

app.config.from_object(os.environ.get('SETTINGS'))

from werkzeug.contrib.fixers import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app)

app.logger.debug("\nConfiguration\n%s\n" % app.config)

# Sentry exception reporting
if 'SENTRY_DSN' in os.environ:
    sentry = Sentry(app, dsn=os.environ['SENTRY_DSN'])

if not app.debug:
    app.logger.addHandler(logging.StreamHandler())
    app.logger.setLevel(logging.INFO)

# Validate config
for property_to_check in ['CASEWORK_URL', 'CHECK_URL']:
	if not app.config[property_to_check]:
		raise Exception('Missing %r configuation property.' % (property_to_check))


Add proxy fix as in lr this will run with reverse proxy
Add proxy fix as in lr this will run with reverse proxy
