mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-01 06:02:32 -08:00
401 -> 403
This commit is contained in:
1 parent
69f76641ac
commit
e8b2224932
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -104,7 +104,7 @@ func (h authedHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
allowed := h.auth.allowsHost(a)
|
||||
if !allowed {
|
||||
http.Error(w, "peer not allowed", http.StatusUnauthorized)
|
||||
http.Error(w, "peer not allowed", http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
h.mux.ServeHTTP(w, r)
|
||||
|
||||
@@ -682,8 +682,8 @@ func TestOnlyTaggedPeersCanJoin(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != http.StatusUnauthorized {
|
||||
t.Fatalf("join req when not tagged, expected status: %d, got: %d", http.StatusUnauthorized, resp.StatusCode)
|
||||
if resp.StatusCode != http.StatusForbidden {
|
||||
t.Fatalf("join req when not tagged, expected status: %d, got: %d", http.StatusForbidden, resp.StatusCode)
|
||||
}
|
||||
rBody, _ := io.ReadAll(resp.Body)
|
||||
sBody := strings.TrimSpace(string(rBody))
|
||||
|
||||
Reference in new issue
Block a user