Adjust routes for reverse proxying

This commit is contained in:
Tim Van Baak 2019-05-15 20:58:15 -07:00
parent c7e4b8e1ef
commit 24a02f6faf
2 changed files with 4 additions and 9 deletions

View File

@ -22,7 +22,7 @@ dungeon = dungeon.Dungeon("dungeon")
itemsources = core.load_all_sources("sources")
@app.route("/feed/")
@app.route("/")
def root():
active_items = dungeon.get_active_items()
logger.info("Found {} active items".format(len(active_items)))
@ -40,8 +40,3 @@ def deactivate():
item = dungeon.deactivate_item(params['source'], params['itemid'])
return jsonify({'active': item['active']})
@app.route("/feed.css")
def css():
with open("feed.css") as f:
return f.read()

View File

@ -1,9 +1,9 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="/feed.css" />
<link rel="stylesheet" type="text/css" href="../feed.css" />
<script>
var deactivate = function (source, itemid) {
fetch('/deactivate/', {
fetch('deactivate/', {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=UTF-8',
@ -48,4 +48,4 @@
{% endif %}
</div>
</body>
</html>
</html>