From 9f94bbc68daaf76236c67ac94c4a7ecae77faac8 Mon Sep 17 00:00:00 2001 From: AnotherFoxGuy Date: Mon, 21 Aug 2023 11:08:12 +0200 Subject: [PATCH] :tada: Added files --- overte_proxy.v | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 overte_proxy.v diff --git a/overte_proxy.v b/overte_proxy.v new file mode 100644 index 0000000..8661451 --- /dev/null +++ b/overte_proxy.v @@ -0,0 +1,24 @@ +module main + +import vweb +import net.http + +struct App { + vweb.Context +} + +fn main() { + vweb.run(&App{}, 5643) +} + +['/:path...'] +fn (mut app App) wildcard(path string) vweb.Result { + mut st := "${path}?" + for key, value in app.query { + st += "${key}=${value}&" + } + + resp := http.get_text('https://mv.overte.org/${st}') + app.set_content_type("application/json") + return app.ok(resp) +}