Make links in info and meta feeds use https

This commit is contained in:
Julius Freudenberger 2023-02-06 23:03:29 +01:00
parent f993969a68
commit f1ec9ea426

4
app.py
View file

@ -15,7 +15,7 @@ VIRTUAL_HOST = os.getenv('VIRTUAL_HOST')
@app.route('/mensa/<parser_name>.json') @app.route('/mensa/<parser_name>.json')
def index(parser_name): def index(parser_name):
try: try:
return utils.get_parser(parser_name).get_canteen_index(f'http://{VIRTUAL_HOST}/mensa/{parser_name}/meta') return utils.get_parser(parser_name).get_canteen_index(f'https://{VIRTUAL_HOST}/mensa/{parser_name}/meta')
except KeyError: except KeyError:
abort(404) abort(404)
@ -23,7 +23,7 @@ def index(parser_name):
@app.route('/mensa/<parser_name>/meta/<canteen_name>.xml') @app.route('/mensa/<parser_name>/meta/<canteen_name>.xml')
def meta(parser_name, canteen_name): def meta(parser_name, canteen_name):
try: try:
return utils.get_parser(parser_name).get_meta_data(canteen_name, f'http://{VIRTUAL_HOST}/mensa/{parser_name}/feed') return utils.get_parser(parser_name).get_meta_data(canteen_name, f'https://{VIRTUAL_HOST}/mensa/{parser_name}/feed')
except KeyError: except KeyError:
abort(404) abort(404)