Skip to content

Commit

Permalink
Fix comments for reverse proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
chovanecm committed Oct 19, 2017
1 parent 46842e8 commit a1687f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions sacredboard/app/webapi/proxy.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
# prody implementation
"""
Reverse proxy support for Sacredboard.
# http://blog.macuyiko.com/post/2016/fixing-flask-url_for-when-behind-mod_proxy.html
http://blog.macuyiko.com/post/2016/fixing-flask-url_for-when-behind-mod_proxy.html
"""


class ReverseProxied(object):
"""
Allow to use a reverse proxy
Allow to use a reverse proxy.
http://blog.macuyiko.com/post/2016/fixing-flask-url_for-when-behind-mod_proxy.html
"""

def __init__(self, app, script_name=None, scheme=None, server=None):
"""Create a new wrapper for Flask."""
self.app = app
self.script_name = script_name
self.scheme = scheme
self.server = server

def __call__(self, environ, start_response):
"""Set environment for Flask."""
script_name = environ.get('HTTP_X_SCRIPT_NAME', '') or self.script_name
if script_name:
environ['SCRIPT_NAME'] = script_name
Expand Down
2 changes: 1 addition & 1 deletion sacredboard/static/scripts/runs/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ define(["knockout", "jquery", "text!runs/filters.html", "runs/filters/queryFilte
Example:
<query-filter params="value: queryFilters"></query-filter>
@method
@function
*/
"initialize": function () {
ko.components.register("query-filter", {
Expand Down

0 comments on commit a1687f1

Please sign in to comment.