[PR #318] [MERGED] Support CNAME'd buckets #512

Closed
opened 2026-03-03 12:30:22 +03:00 by kerem · 0 comments
Owner

📋 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: mainHead: cname-urls


📝 Commits (5)

  • 5d036fc Support CNAME'd buckets / URLs
  • bb776fa Also allow CNAME'd GETs
  • 2c55737 Add tests for CNAME changes
  • b36ee5b Move CNAME tests to upload suite
  • 2715b6c Rename 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-server for 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.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/318 **Author:** [@kenniaa](https://github.com/kenniaa) **Created:** 8/28/2020 **Status:** ✅ Merged **Merged:** 9/12/2020 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `cname-urls` --- ### 📝 Commits (5) - [`5d036fc`](https://github.com/fsouza/fake-gcs-server/commit/5d036fc5c2a66d5186e867c701d7352248d50a80) Support CNAME'd buckets / URLs - [`bb776fa`](https://github.com/fsouza/fake-gcs-server/commit/bb776fae188de6efd890b75f97d65eafb67552bb) Also allow CNAME'd GETs - [`2c55737`](https://github.com/fsouza/fake-gcs-server/commit/2c557378e1989d837455d6ffd259c34cfa4946ac) Add tests for CNAME changes - [`b36ee5b`](https://github.com/fsouza/fake-gcs-server/commit/b36ee5be74cedb9ca816fde5f89551e3fae85eee) Move CNAME tests to upload suite - [`2715b6c`](https://github.com/fsouza/fake-gcs-server/commit/2715b6cbb5a1784fe744ed1c1c5494488501eaf8) Rename CNAME tests and move read test ### 📊 Changes **3 files changed** (+93 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object_test.go` (+41 -0) 📝 `fakestorage/server.go` (+4 -1) 📝 `fakestorage/upload_test.go` (+48 -0) </details> ### 📄 Description I was having some issues interfacing with `fake-gcs-server` for 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:30:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#512
No description provided.