Proper caching
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/debridmediamanager.com/zurg/internal/torrent"
|
||||
)
|
||||
@@ -14,9 +13,8 @@ func Router(mux *http.ServeMux) {
|
||||
t := torrent.NewTorrentManager(os.Getenv("RD_TOKEN"))
|
||||
|
||||
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
requestPath := path.Clean(r.URL.Path)
|
||||
|
||||
log.Println(r.Method, requestPath)
|
||||
// requestPath := path.Clean(r.URL.Path)
|
||||
// log.Println(r.Method, requestPath)
|
||||
|
||||
switch r.Method {
|
||||
case "PROPFIND":
|
||||
@@ -24,6 +22,7 @@ func Router(mux *http.ServeMux) {
|
||||
|
||||
case http.MethodGet:
|
||||
HandleGetRequest(w, r, t)
|
||||
// default return
|
||||
|
||||
case http.MethodOptions:
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
||||
Reference in New Issue
Block a user