log denied forwardedIp
All checks were successful
Docker Build / build-and-push-image (push) Successful in 1m31s
All checks were successful
Docker Build / build-and-push-image (push) Successful in 1m31s
This commit is contained in:
4
main.go
4
main.go
@@ -287,7 +287,8 @@ func retrieveHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err != nil ||
|
||||
!slices.Contains(oauthDeviceCodeAllowedIPs, userIP) &&
|
||||
!slices.Contains(oauthDeviceCodeAllowedIPs, userIPforwarded) {
|
||||
fmt.Fprintln(os.Stderr, "denied userIP: "+userIP)
|
||||
fmt.Fprintln(os.Stderr, "denied userIP: "+userIP+" forwarded: "+userIPforwarded)
|
||||
fmt.Fprintf(os.Stderr, "alowed ips: %+v", oauthDeviceCodeAllowedIPs)
|
||||
// Parcourir tous les headers
|
||||
for name, values := range r.Header {
|
||||
// name représente le nom de l'en-tête
|
||||
@@ -493,7 +494,6 @@ func main() {
|
||||
http.HandleFunc("/retrieve", retrieveHandler)
|
||||
http.HandleFunc("/test-oauth-callback", test_oauth2_callback)
|
||||
|
||||
|
||||
// Start the HTTP server
|
||||
port := ":8080"
|
||||
log.Printf("Server starting on port %s\n", port)
|
||||
|
||||
Reference in New Issue
Block a user