diff options
| author | Fuwn <[email protected]> | 2021-08-24 05:05:05 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-08-24 05:05:05 +0000 |
| commit | 2ca238824651d1df016dcef4c1e66973fcd42b3c (patch) | |
| tree | bd3fa6b88d43ba6baee01f6b3648058d455d485f | |
| parent | chore(readme): docker compose usage information (diff) | |
| download | capybara-2ca238824651d1df016dcef4c1e66973fcd42b3c.tar.xz capybara-2ca238824651d1df016dcef4c1e66973fcd42b3c.zip | |
refactor(capybara): proxy to /proxy/ (prev: /x/)
| -rw-r--r-- | main.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -108,7 +108,7 @@ var gemtextPage = template.Must(template. if u.Scheme == "" || u.Scheme == "gemini" { if u.Host != ctx.Root.Host { - u.Path = fmt.Sprintf("/x/%s%s", u.Host, u.Path) + u.Path = fmt.Sprintf("/proxy/%s%s", u.Host, u.Path) } u.Scheme = "" u.Host = "" @@ -437,7 +437,7 @@ func proxyGemini(req gemini.Request, external bool, root *url.URL, return } if external { - next.Path = fmt.Sprintf("/x/%s/%s", next.Host, next.Path) + next.Path = fmt.Sprintf("/proxy/%s/%s", next.Host, next.Path) } next.Host = r.URL.Host next.Scheme = r.URL.Scheme @@ -627,7 +627,7 @@ func main() { proxyGemini(req, false, root, w, r, css, external) })) - http.Handle("/x/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Handle("/proxy/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.Method == "POST" { r.ParseForm() if q, ok := r.Form["q"]; !ok { |