summaryrefslogtreecommitdiff
path: root/bin/efa-gw
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-03-27 12:53:38 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-03-27 12:53:38 +0100
commit2bd30e325041ad7ec5afe7044e559070616621e9 (patch)
tree68ed19eb5f1c74e8585fe7795bffe34dae648c2d /bin/efa-gw
parent5b1230ccfe644e132fba7c5548336ccbb91ef04b (diff)
add prefix argument for reverse-proxy setups
Diffstat (limited to 'bin/efa-gw')
-rwxr-xr-xbin/efa-gw3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/efa-gw b/bin/efa-gw
index ecb091a..fc6e949 100755
--- a/bin/efa-gw
+++ b/bin/efa-gw
@@ -72,9 +72,10 @@ if __name__ == "__main__":
"--eva-csv", type=str, metavar="FILE", default="haltestellenMitEva.csv"
)
parser.add_argument("--port", type=int, metavar="PORT", default=8080)
+ parser.add_argument("--prefix", type=str, metavar="PATH", default="/")
args = parser.parse_args()
eva_to_name = load_eva_to_name(args.eva_csv)
app = web.Application()
- app.add_routes([web.get("/{eva}.json", handle_eva)])
+ app.add_routes([web.get(f"{args.prefix}{{eva}}.json", handle_eva)])
web.run_app(app, host="localhost", port=args.port)