mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 21:55:56 +03:00
[PR #318] [MERGED] Support CNAME'd buckets #512
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#512
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/fsouza/fake-gcs-server/pull/318
Author: @kenniaa
Created: 8/28/2020
Status: ✅ Merged
Merged: 9/12/2020
Merged by: @fsouza
Base:
main← Head:cname-urls📝 Commits (5)
5d036fcSupport CNAME'd buckets / URLsbb776faAlso allow CNAME'd GETs2c55737Add tests for CNAME changesb36ee5bMove CNAME tests to upload suite2715b6cRename CNAME tests and move read test📊 Changes
3 files changed (+93 additions, -1 deletions)
View changed files
📝
fakestorage/object_test.go(+41 -0)📝
fakestorage/server.go(+4 -1)📝
fakestorage/upload_test.go(+48 -0)📄 Description
I was having some issues interfacing with
fake-gcs-serverfor buckets behind a CNAME, where the bucket name is the host itself. It seems as though only Path based (storage.googleapis.com/myBucketName) or VHost based (myBucketName.storage.googleapis.com) are supported.This small fix addresses the issue by providing additional routes which consider the host as a bucket name; one for GETing a file and another for Signed URLs.
I also had to shuffle the route order slightly to prevent routes from conflicting.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.