clarify HTTP 200 detail: anonymous access, not listing
CloudFront/CDN endpoints return 200 for GET / but are not listable; the generic HTTP check now says 'anonymous access succeeded' instead of 'listing allowed'.
This commit is contained in:
1 parent
c90d5cc023
commit
7034aab4b6
1 file changed
+3
-1
@@ -443,7 +443,9 @@ func classifyStatus(status int, tag string) (model.ExposureState, string) {
|
||||
}
|
||||
switch {
|
||||
case status >= 200 && status < 300:
|
||||
return model.ExposurePublicRead, fmt.Sprintf("%sstatus=%d anonymous listing allowed", prefix, status)
|
||||
// Generic HTTP check: anonymous access succeeded, but this is not a
|
||||
// storage list API, so it does not imply the resource is listable.
|
||||
return model.ExposurePublicRead, fmt.Sprintf("%sstatus=%d anonymous access succeeded", prefix, status)
|
||||
case status == http.StatusUnauthorized || status == http.StatusForbidden:
|
||||
return model.ExposureAuthRequired, fmt.Sprintf("%sstatus=%d authentication required", prefix, status)
|
||||
case status == http.StatusNotFound || status == http.StatusGone:
|
||||
|
||||
Reference in new issue
Block a user