Skip to content

Commit 8e75539

Browse files
send a proper response from auth service (#3)
This change ensures the service sets an explicit content-type on its responses and sends an "ok" message on successful requests.
1 parent 9c2903a commit 8e75539

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/auth/service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package auth
22

33
import (
44
"encoding/json"
5+
"fmt"
56
"io"
67
"net/http"
78

@@ -27,4 +28,7 @@ func HandleAuth(w http.ResponseWriter, r *http.Request) {
2728
utils.HandleError(w, err)
2829
return
2930
}
31+
32+
w.Header().Set("content-type", "text/plain")
33+
fmt.Fprintf(w, "ok")
3034
}

0 commit comments

Comments
 (0)