Documentation
¶
Overview ¶
Package urlbuilder wraps teapot-router's urlbuilder.Builder to add virtual-hosted-style URL generation.
Whichever style a generated URL uses mirrors the *inbound* request's style: if the client already reached us via vhost, it gets vhost URLs back, otherwise path-style — keeping presigned URLs, Location headers, and CopyObject sources consistent with however the client is already talking to us.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder generates URLs for S3 API responses, choosing path-style or vhost-style per request.
func New ¶
New creates a new Builder. If canonicalDomain is empty, URLs are always built path-style from the request Host header (byte-for-byte the same as upstream's Builder, since vhost resolution is disabled).