<commit_before>import os, logging
from flask import Flask
from flask.ext.basicauth import BasicAuth
from raven.contrib.flask import Sentry
from lrutils import dateformat

app = Flask(__name__)

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

app.jinja_env.filters['dateformat'] = dateformat

if app.config.get('BASIC_AUTH_USERNAME'):
    app.config['BASIC_AUTH_FORCE'] = True
    basic_auth = BasicAuth(app)
<commit_msg>Add proxy fix as in lr this will run with reverse proxy<commit_after>import os, logging
from flask import Flask
from flask.ext.basicauth import BasicAuth
from raven.contrib.flask import Sentry
from lrutils import dateformat

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.jinja_env.filters['dateformat'] = dateformat

if app.config.get('BASIC_AUTH_USERNAME'):
    app.config['BASIC_AUTH_FORCE'] = True
    basic_auth = BasicAuth(app)

{'fraction_non_alphanumeric': 0.09753593429158111, 'fraction_numerical': 0.0, 'mean_word_length': 5.866197183098592, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2334268', 'n_tokens_mistral': 337, 'n_tokens_neox': 329, 'n_words': 77}