diff --git a/doc/manpages/object-server.conf.5 b/doc/manpages/object-server.conf.5 index 401913f454..908b5f48da 100644 --- a/doc/manpages/object-server.conf.5 +++ b/doc/manpages/object-server.conf.5 @@ -211,7 +211,7 @@ On PUTs, sync data every n MB. The default is 512. .IP "\fBallowed_headers\fR" 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. -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" The default is '.'. .IP "\fBreplication_server\fR" diff --git a/doc/source/deployment_guide.rst b/doc/source/deployment_guide.rst index d740b32c20..1218190661 100644 --- a/doc/source/deployment_guide.rst +++ b/doc/source/deployment_guide.rst @@ -594,6 +594,10 @@ allowed_headers Content-Disposition, Comma separated list o X-Delete-At, This list is in addition to X-Object-Manifest, X-Object-Meta-* headers and cannot include 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 creating accounts. replication_server Configure parameter for creating diff --git a/etc/object-server.conf-sample b/etc/object-server.conf-sample index 8cd97ed8a0..097f31472f 100644 --- a/etc/object-server.conf-sample +++ b/etc/object-server.conf-sample @@ -120,9 +120,7 @@ use = egg:swift#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 -# Note that you may add some extra headers for better S3 compatibility, they are: -# 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 +# allowed_headers = Content-Disposition, Content-Encoding, X-Delete-At, X-Object-Manifest, X-Static-Large-Object, Cache-Control, Content-Language, Expires, X-Robots-Tag # # auto_create_account_prefix = . # diff --git a/swift/common/middleware/s3api/s3api.py b/swift/common/middleware/s3api/s3api.py index ea7b328e64..11569aa4c6 100644 --- a/swift/common/middleware/s3api/s3api.py +++ b/swift/common/middleware/s3api/s3api.py @@ -65,14 +65,6 @@ When using keystone, the config will be:: both authtoken and s3token will issue the acceptable token to keystone (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 ----------- diff --git a/swift/obj/server.py b/swift/obj/server.py index 2f584bb319..5a3ba8d6f0 100644 --- a/swift/obj/server.py +++ b/swift/obj/server.py @@ -141,6 +141,10 @@ class ObjectController(BaseStorageServer): x-delete-at, x-object-manifest, x-static-large-object, + cache-control, + content-language, + expires, + x-robots-tag ''' extra_allowed_headers = [ header.strip().lower() for header in conf.get(