[GH-ISSUE #1998] Feature: Support Dynamic Host and Port #240

Open
opened 2026-03-03 12:09:22 +03:00 by kerem · 2 comments
Owner

Originally created by @jochen42 on GitHub (Aug 14, 2025).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1998

To be able to use the service with multiple hostnames and multiple port-mappings, the rendered url's within json-responces should use the scheme, host and port from the request-object to build the url's insteat of a static configuration.

Originally created by @jochen42 on GitHub (Aug 14, 2025). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1998 To be able to use the service with multiple hostnames and multiple port-mappings, the rendered url's within json-responces should use the scheme, host and port from the request-object to build the url's insteat of a static configuration.
Author
Owner

@fsouza commented on GitHub (Aug 25, 2025):

I think the proposed change works, but can you clarify the use case?

<!-- gh-comment-id:3218696772 --> @fsouza commented on GitHub (Aug 25, 2025): I think the proposed change works, but can you clarify the use case?
Author
Owner

@jochen42 commented on GitHub (Sep 1, 2025):

hi! sorry for the late reply. use cases are the following both:

  1. Need to access from a docker internal network for inter-service communication and additionaly need to access from outside the container-network (docker port mapping)
  2. Need to use a dynamic mapped port with testcontainer.. since the dynamic mapped port is not known while starting, it is impossible to add it as a cli-param. this enables mutiple parallel test-executions and testing while developing.
<!-- gh-comment-id:3241069841 --> @jochen42 commented on GitHub (Sep 1, 2025): hi! sorry for the late reply. use cases are the following both: 1. Need to access from a docker internal network for inter-service communication and additionaly need to access from outside the container-network (docker port mapping) 2. Need to use a [dynamic mapped port with testcontainer.](https://node.testcontainers.org/features/containers/#exposing-container-ports). since the dynamic mapped port is not known while starting, it is impossible to add it as a cli-param. this enables mutiple parallel test-executions and testing while developing.
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#240
No description provided.