Download internal/admin_static.go from bg5/zai2api3: direct link, hf CLI and curl.
- Browser
- Download file 361 Bytes
-
https://huggingface.co/spaces/bg5/zai2api3/resolve/main/internal/admin_static.go
- Command line
-
hf download hf://spaces/bg5/zai2api3/internal/admin_static.go
-
curl -L -o admin_static.go https://huggingface.co/spaces/bg5/zai2api3/resolve/main/internal/admin_static.go
361 Bytes
| package internal | |
| import ( | |
| _ "embed" | |
| "net/http" | |
| ) | |
| //go:embed admin_ui.html | |
| var adminUIHTML []byte | |
| // HandleAdminUI GET /admin/ 返回单页应用 HTML | |
| func HandleAdminUI(w http.ResponseWriter, r *http.Request) { | |
| w.Header().Set("Content-Type", "text/html; charset=utf-8") | |
| w.Header().Set("Cache-Control", "no-cache") | |
| w.Write(adminUIHTML) | |
| } | |