[#399] Add OPTIONS method for object operations #399
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 project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#399
Loading…
Reference in a new issue
No description provided.
Delete branch "mbiryukova/frostfs-s3-gw:bugfix/object_options"
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?
Signed-off-by: Marina Biryukova m.biryukova@yadro.com
def61b0594
to52363f7903
[#xxx] Add OPTIONS method for object operationsto [#399] Add OPTIONS method for object operations52363f7903
to3a5f28b007
@ -190,2 +190,2 @@
w.Header().Set(api.AccessControlAllowOrigin, o)
w.Header().Set(api.AccessControlAllowMethods, strings.Join(rule.AllowedMethods, ", "))
w.Header().Set(api.AccessControlAllowOrigin, origin)
w.Header().Set(api.AccessControlAllowMethods, method)
Why do we need these changes?
And if we really need this we should add test for this (currently tests pass with or without these changes)
Changed according to spec. I will add test
@ -224,3 +224,3 @@
bktRouter.Mount("/", objectRouter(h, log))
bktRouter.Options("/", h.Preflight)
bktRouter.Options("/", named(s3middleware.OptionsOperation, h.Preflight))
Maybe we should distinguish bucket options operation and object options operation (I mean naming
s3middleware.OptionsOperation
)@ -373,1 +373,3 @@
objRouter.Use(s3middleware.AddObjectName(l))
objRouter.Use(
s3middleware.AddObjectName(l),
s3middleware.WrapHandler(h.AppendCORSHeaders),
I'm not sure we need this. Because we have already add (and invoke) this handler in bktRouter, so in object router we inherit it. Currently
h.AppendCORSHeaders
is being invoked twice for every object request3a5f28b007
to06edda6c5f
LGTM