core/authorize: result denied improvements (#4952)

* core/authorize: result denied improvements

* add authenticate robots.txt

* fix tests
This commit is contained in:
Caleb Doxsey 2024-02-01 16:16:33 -07:00 committed by GitHub
parent 61a9bd7c6b
commit 55eb2fa3dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 19 additions and 91 deletions

View file

@ -2,7 +2,6 @@ package proxy
import (
"errors"
"fmt"
"io"
"net/http"
"net/url"
@ -43,13 +42,6 @@ func (p *Proxy) registerDashboardHandlers(r *mux.Router) *mux.Router {
return r
}
// RobotsTxt sets the User-Agent header in the response to be "Disallow"
func (p *Proxy) RobotsTxt(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "User-agent: *\nDisallow: /")
}
// SignOut clears the local session and redirects the request to the sign out url.
// It's the responsibility of the authenticate service to revoke the remote session and clear
// the authenticate service's session state.