mirror of
https://git.macaw.me/skunky/SkunkyArt.git
synced 2025-04-04 05:27:35 +03:00
ы
This commit is contained in:
parent
191984b31e
commit
911923fde1
6 changed files with 16 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue