cleanup
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 34s

This commit is contained in:
matst80
2025-05-16 07:18:32 +02:00
parent ccd4bf56e1
commit d65c9f6998
2 changed files with 3 additions and 10 deletions

View File

@@ -183,7 +183,7 @@ func main() {
if r.Method == "GET" {
content, err := folder.Storage.Get(fileName)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.WriteHeader(http.StatusNotFound)
return
}
w.Header().Set("Content-Type", esimateMimeType(fileName))
@@ -196,6 +196,7 @@ func main() {
authKey := r.Header.Get("Authorization")
if authKey != apiKey {
w.WriteHeader(http.StatusUnauthorized)
log.Printf("auth value %s is not correct, current: %s", authKey, apiKey)
return
}
data, err := io.ReadAll(r.Body)