Skip to content
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

Allow one to specify server endpoint in config #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shouya
Copy link

@shouya shouya commented Jun 16, 2023

I'm experimenting running aw-server-rust from my home k8s network, with a tls enabled ingress. However, when I trying point my local aw-client to the server I find no success - the config doesn't seem to allow me to specify an https endpoint address. Peeking into the code seems to indicate that the endpoint is hard-coded by stitching up a default protocol, and the host, port from config.

I guess there is no reason that it cannot support https, so I patched the source code like this. Now it worked perfectly for me. Would you like to accept it to the upstream?

Copy link
Member

@ErikBjare ErikBjare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale review I forgot to submit.

protocol=protocol, host=server_host, port=server_port
)
self.server_address = server_config["endpoint"] or default_server_address
Copy link
Member

@ErikBjare ErikBjare Jun 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a better name than endpoint (which imo is more something like /api/info, or a full path).

I've seen some APIs use baseurl, which I like.

Suggested change
self.server_address = server_config["endpoint"] or default_server_address
self.server_address = server_config["baseurl"] or default_server_address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants