Add s3api headers to allowed_headers by default
Previously, these headers had to be added by operators to their object-server.conf when enabling swift3 middleware. Since s3api is now imported into swift we should go ahead and add these headers by default too. Change-Id: Ib82e175096716e42aecdab48f01f079e09da6a1d Signed-off-by: Thiago da Silva <thiago@redhat.com>
This commit is contained in:
@@ -211,7 +211,7 @@ On PUTs, sync data every n MB. The default is 512.
|
|||||||
.IP "\fBallowed_headers\fR"
|
.IP "\fBallowed_headers\fR"
|
||||||
Comma separated list of headers that can be set in metadata on an object.
|
Comma separated list of headers that can be set in metadata on an object.
|
||||||
This list is in addition to X-Object-Meta-* headers and cannot include Content-Type, etag, Content-Length, or deleted.
|
This list is in addition to X-Object-Meta-* headers and cannot include Content-Type, etag, Content-Length, or deleted.
|
||||||
The default is 'Content-Disposition, Content-Encoding, X-Delete-At, X-Object-Manifest, X-Static-Large-Object'.
|
The default is 'Content-Disposition, Content-Encoding, X-Delete-At, X-Object-Manifest, X-Static-Large-Object, Cache-Control, Content-Language, Expires, X-Robots-Tag'.
|
||||||
.IP "\fBauto_create_account_prefix\fR"
|
.IP "\fBauto_create_account_prefix\fR"
|
||||||
The default is '.'.
|
The default is '.'.
|
||||||
.IP "\fBreplication_server\fR"
|
.IP "\fBreplication_server\fR"
|
||||||
|
@@ -594,6 +594,10 @@ allowed_headers Content-Disposition, Comma separated list o
|
|||||||
X-Delete-At, This list is in addition to
|
X-Delete-At, This list is in addition to
|
||||||
X-Object-Manifest, X-Object-Meta-* headers and cannot include
|
X-Object-Manifest, X-Object-Meta-* headers and cannot include
|
||||||
X-Static-Large-Object Content-Type, etag, Content-Length, or deleted
|
X-Static-Large-Object Content-Type, etag, Content-Length, or deleted
|
||||||
|
Cache-Control,
|
||||||
|
Content-Language,
|
||||||
|
Expires,
|
||||||
|
X-Robots-Tag
|
||||||
auto_create_account_prefix . Prefix used when automatically
|
auto_create_account_prefix . Prefix used when automatically
|
||||||
creating accounts.
|
creating accounts.
|
||||||
replication_server Configure parameter for creating
|
replication_server Configure parameter for creating
|
||||||
|
@@ -120,9 +120,7 @@ use = egg:swift#object
|
|||||||
# Comma separated list of headers that can be set in metadata on an object.
|
# Comma separated list of headers that can be set in metadata on an object.
|
||||||
# This list is in addition to X-Object-Meta-* headers and cannot include
|
# This list is in addition to X-Object-Meta-* headers and cannot include
|
||||||
# Content-Type, etag, Content-Length, or deleted
|
# Content-Type, etag, Content-Length, or deleted
|
||||||
# Note that you may add some extra headers for better S3 compatibility, they are:
|
# allowed_headers = Content-Disposition, Content-Encoding, X-Delete-At, X-Object-Manifest, X-Static-Large-Object, Cache-Control, Content-Language, Expires, X-Robots-Tag
|
||||||
# Cache-Control, Content-Language, Expires, and X-Robots-Tag
|
|
||||||
# allowed_headers = Content-Disposition, Content-Encoding, X-Delete-At, X-Object-Manifest, X-Static-Large-Object
|
|
||||||
#
|
#
|
||||||
# auto_create_account_prefix = .
|
# auto_create_account_prefix = .
|
||||||
#
|
#
|
||||||
|
@@ -65,14 +65,6 @@ When using keystone, the config will be::
|
|||||||
both authtoken and s3token will issue the acceptable token to keystone
|
both authtoken and s3token will issue the acceptable token to keystone
|
||||||
(i.e. authenticate twice).
|
(i.e. authenticate twice).
|
||||||
|
|
||||||
Object-Server Setting
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
To get better compatibility, you may add S3 supported headers (
|
|
||||||
Cache-Control, Content-Language, Expires, and X-Robots-Tag), that are
|
|
||||||
not supporeted in Swift by default, into allowed_headers option in
|
|
||||||
``object-server.conf`` Please see ``object-server.conf`` for more detail.
|
|
||||||
|
|
||||||
-----------
|
-----------
|
||||||
Constraints
|
Constraints
|
||||||
-----------
|
-----------
|
||||||
|
@@ -141,6 +141,10 @@ class ObjectController(BaseStorageServer):
|
|||||||
x-delete-at,
|
x-delete-at,
|
||||||
x-object-manifest,
|
x-object-manifest,
|
||||||
x-static-large-object,
|
x-static-large-object,
|
||||||
|
cache-control,
|
||||||
|
content-language,
|
||||||
|
expires,
|
||||||
|
x-robots-tag
|
||||||
'''
|
'''
|
||||||
extra_allowed_headers = [
|
extra_allowed_headers = [
|
||||||
header.strip().lower() for header in conf.get(
|
header.strip().lower() for header in conf.get(
|
||||||
|
Reference in New Issue
Block a user