diff options
| author | lost+skunk <[email protected]> | 2024-11-15 22:43:27 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-11-15 22:43:27 +0300 |
| commit | 911923fde11ed1e0efbc56f851f9b50e5e48665d (patch) | |
| tree | d7b9b9b8738aee1843a647285bbc5877044c071a /app/router.go | |
| parent | 191984b31ef228c4077904a2831a2af593352670 (diff) | |
| download | skunky-art-911923fde11ed1e0efbc56f851f9b50e5e48665d.tar.gz skunky-art-911923fde11ed1e0efbc56f851f9b50e5e48665d.tar.bz2 skunky-art-911923fde11ed1e0efbc56f851f9b50e5e48665d.zip | |
ы
Diffstat (limited to 'app/router.go')
| -rw-r--r-- | app/router.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/router.go b/app/router.go index eddf0a9..c7dd623 100644 --- a/app/router.go +++ b/app/router.go @@ -9,7 +9,9 @@ import ( "strings" ) -var Host, Path string +var Host string + +// var Path *string func Router() { parsepath := func(path string) map[int]string { @@ -54,15 +56,14 @@ func Router() { // функция, что управляет всем handle := func(w http.ResponseWriter, r *http.Request) { - Path = r.URL.Path - path := parsepath(Path) + path := parsepath(r.URL.Path) Host = "http://" + r.Host - if h := r.Header["X-Forwarded-Proto"]; len(h) != 0 && h[0] == "https" { Host = "https://" + r.Host } var skunky = skunkyart{Version: Release.Version} + skunky._pth = r.URL.Path skunky.Args = r.URL.Query() arg := skunky.Args.Get |
