mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-26 06:05:54 +03:00
[PR #1215] [MERGED] Add scheme option to bind to both HTTP and HTTPS #1297
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#1297
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/1215
Author: @raz-amir
Created: 6/15/2023
Status: ✅ Merged
Merged: 8/1/2023
Merged by: @fsouza
Base:
main← Head:ramir_both_schemes📝 Commits (8)
0e467a4Add scheme option to bind to both HTTP and HTTPSea0ba66changesb053e10Change to 2 listeners and a single serverd708feefix46a6906Apply suggestions from code review9cffba9fix for default ports handling8614c04check if flags default value using visitda920f7add example test runs and unit tests📊 Changes
7 files changed (+375 additions, -51 deletions)
View changed files
📝
.github/workflows/main.yml(+6 -0)📝
README.md(+23 -12)➕
ci/run-curl-both-scheme-default-ports-example.sh(+11 -0)➕
ci/run-curl-both-scheme-non-default-ports-example.sh(+11 -0)📝
internal/config/config.go(+50 -8)📝
internal/config/config_test.go(+215 -3)📝
main.go(+59 -28)📄 Description
We have a use case where we need the same server to run in both HTTP and HTTPS.
This PR starts two servers when needed (the default single HTTPS server is kept).
It is controlled by adding/changing the following command line arguments:
schemeargument can now get the valuebothport-httpargument, defaults to8080, is used to bind HTTP port only whenschemeis set toboth. To clarify: to maintain backwards compatibility, when theschemeis set tohttp, this argument isn't used. The previousportwill be used to bind HTTPS.Added/updated tests
Updated README
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.