aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-08-24 05:05:05 +0000
committerFuwn <[email protected]>2021-08-24 05:05:05 +0000
commit2ca238824651d1df016dcef4c1e66973fcd42b3c (patch)
treebd3fa6b88d43ba6baee01f6b3648058d455d485f
parentchore(readme): docker compose usage information (diff)
downloadcapybara-2ca238824651d1df016dcef4c1e66973fcd42b3c.tar.xz
capybara-2ca238824651d1df016dcef4c1e66973fcd42b3c.zip
refactor(capybara): proxy to /proxy/ (prev: /x/)
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index b6d4ebf..45a12d7 100644
--- a/main.go
+++ b/main.go
@@ -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 {