-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor setting of - Server.OpenApiSpec.Servers #248
Comments
Another use case to consider is when the service is accessed through a reverse proxy, requiring the ability to specify a public address instead of relying on the default configuration. |
I believe that's already possible with |
Mmh I don't see any issue, I mean I deploy Fuego on my infra with a reverse proxy without issue. Please tell us more, I'll be happy to help! |
Apologies for the delay. The issue I encountered is that when deploying multiple instances of the service (e.g., Docker containers) behind a reverse proxy with different hostnames, the URL to The solution I implemented was to redefine
|
Oh I see. The URL for the input here needs to be configurable. |
Yes I'm doing this too, instead of auto-discovering its own public address, I just configure the public URL manually. But I guess that's fine doing like you did, I also do that too for all the things that are purely OpenAPI-related, without too much impact on the running server. |
Yes, it is better to configure the public URL manually rather than adding complexity by attempting to auto-discover it. This approach also allows reusing the public address consistently wherever it is needed. |
Will be best to wait for the finish of #262 |
Right now we do it in the constructor of Server function. We should push this closer to startup of the server as we can interpret if the user is running an http or https server as well as get the proper address since #245 we do not know the final address we use until
s.setup()
is called nor if the server is https or http.In regards to just printing. We can just assume
http
for now. If we find we have a reason to allow the user to ensure the server setup is https we can update thes.OutputOpenAPISpec()
to bes.OutputOpenAPISpec(isTLS bool)
. We really don't have another way of doing this since we truly don't know if the server is an http or https webserver until startup.The text was updated successfully, but these errors were encountered: