Skip to content

Commit b15c156

Browse files
authored
fix(policies): ignore http 405 as well as 404 (#1672)
Signed-off-by: Jose I. Paris <[email protected]>
1 parent d014234 commit b15c156

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controlplane/pkg/policies/policyprovider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (p *PolicyProvider) ValidateAttachment(att *schemaapi.PolicyAttachment, tok
138138
}
139139

140140
if resp.StatusCode != http.StatusOK {
141-
if resp.StatusCode == http.StatusNotFound {
141+
if resp.StatusCode == http.StatusNotFound || resp.StatusCode == http.StatusMethodNotAllowed {
142142
// Ignore endpoint not found as it might not be implemented by the provider
143143
return nil
144144
}

0 commit comments

Comments
 (0)