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

Host Head as Env Var #61

Open
tigerpeng2001 opened this issue Apr 22, 2022 · 3 comments
Open

Host Head as Env Var #61

tigerpeng2001 opened this issue Apr 22, 2022 · 3 comments
Labels
question Further information is requested

Comments

@tigerpeng2001
Copy link

Hello,

Is it possible to optionally pass the host header as an environmental variable into the container, so no host head is needed from the command line, the normal browser can be used, and some client applications can be configured easily?

Tiger

@Symbianx
Copy link

Symbianx commented Apr 25, 2022

Was having the same question and took a look at the code.
Looks like it's possible to pass --host as an parameter to override the host to proxy to.

https://github.com/awslabs/aws-sigv4-proxy/blob/master/cmd/aws-sigv4-proxy/main.go#L45

@alvinlin123 alvinlin123 added the question Further information is requested label Aug 26, 2022
@alvinlin123
Copy link
Collaborator

@tigerpeng2001 can you elaborate further? Seems like --host does not work for and you would like the proxy to grab the value from some environment variable?

the normal browser can be used, and some client applications can be configured easily

Can you elaborate more on this case? I am not sure I understand why --host doesn't work for your use case. Thanks in advance :-)

@damscott
Copy link

I had initially assumed that I needed this feature as well, because my host value comes from an environmental variable. If you are running it in Kubernetes, you can inject environmental variables into the command arguments with the $() syntax:

image: public.ecr.aws/aws-observability/aws-sigv4-proxy:1.6
args:
  - --name=es
  - --region=$(AWS_REGION)
  - --host=$(ELASTICSEARCH_URL)
  - --port=:9200

This worked for my use case.

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

No branches or pull requests

4 participants