Skip to content

Commit

Permalink
feat: remove auth requirement for http endpoints
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Gleich <[email protected]>
  • Loading branch information
gleich committed Dec 22, 2024
1 parent 7a95b53 commit a10808a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ type cacheData[T any] struct {
// Handle a GET request to load data from the given cache
func (c *Cache[T]) ServeHTTP() http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Header.Get("Authorization") != "Bearer "+secrets.SECRETS.ValidToken {
w.WriteHeader(http.StatusUnauthorized)
return
}
c.dataMutex.RLock()
w.Header().Set("Content-Type", "application/json")
err := json.NewEncoder(w).Encode(cacheData[T]{Data: c.data, Updated: c.updated})
Expand Down

0 comments on commit a10808a

Please sign in to comment.