diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -69,6 +69,10 @@ func (handler BoxHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } w.WriteHeader(http.StatusNoContent) case http.MethodPost: + if r.URL.Path != "/upload" { + w.WriteHeader(http.StatusBadRequest) + return + } token := r.Header.Get("X-Upload-Token") if token != handler.token { log.Println("unauthorized") |
