[#226] Improve CORS validation #238
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-http-gw#238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "mbiryukova/frostfs-http-gw:feature/cors_validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #226
Signed-off-by: Marina Biryukova m.biryukova@yadro.com
@ -80,2 +80,4 @@
for _, rule := range corsConfig.CORSRules {
if err = checkCORSRule(rule); err != nil {
log.Error(logs.InvalidCORSRue, zap.Error(err), logs.TagField(logs.TagDatapath))
logs.InvalidCorsRule
@ -178,6 +186,22 @@ func (h *Handler) SetCORSHeaders(req *fasthttp.RequestCtx) {
}
}
func checkCORSRule(rule data.CORSRule) error {
What about more meaningful name like
checkWildcards
or something like that?1f6368471a
to871ae5d763
LGTM
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.