commit 9f94bbc68daaf76236c67ac94c4a7ecae77faac8 Author: AnotherFoxGuy Date: Mon Aug 21 11:08:12 2023 +0200 :tada: Added files 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) +}