🎉 Added files
This commit is contained in:
commit
9f94bbc68d
24
overte_proxy.v
Normal file
24
overte_proxy.v
Normal file
@ -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)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user