swift3/etc/object-server.conf-sample
Tim Burke f9d856fc26 Transcribe more headers for responses
Per AWS's docs, Cache-Control and Expires may be set on upload [1]. On
download, the same headers would then be included in the response.
Previously, these would not be included in Swift3 responses; now they
will be.

Additionally, several headers may be set on download via query
parameters. This functionality already exists, but AWS's docs specify
that this is "a subset of the headers that Amazon S3 accepts when you
create an object" [2], so we should ensure Content-Language and
Content-Disposition are transcribed as well.

Finally, there is at least one undocumented header, X-Robots-Tag, which
AWS allows to be set. At the very least, Boto [3] knows to try.

Note that setting all of these headers already worked in Swift3, but
requires that you update the allowed_headers option in the
[app:object-server] section of object-server.conf. The conf used for
functional tests has been so updated.

[1] http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html#RESTObjectPUT-requests-request-headers

[2] http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html#RESTObjectGET-requests-request-parameters

[3] https://github.com/boto/boto/commit/0c11983

Change-Id: I22001c6fd14033a9f13c36a3e05fdc678c75654f
2015-10-09 17:00:32 -07:00

19 lines
704 B
Plaintext

[DEFAULT]
[pipeline:main]
# This is the minimum pipeline for Swift (and Swift3)
pipeline = object-server
[app:object-server]
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 S3 allows more headers than the default Swift object-server
# configuration. In particular, You may need to add Cache-Control,
# Content-Language, Expires, and X-Robots-Tag
allowed_headers = Cache-Control, Content-Disposition, Content-Encoding,
Content-Language, Expires, X-Delete-At, X-Object-Manifest, X-Robots-Tag,
X-Static-Large-Object