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

Add support for headers to requests #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drGrove
Copy link
Contributor

@drGrove drGrove commented Sep 8, 2022

To support other authentication methods as well as potential required headers from other services. Add support for passing a header object as stringified JSON

Copy link
Member

@jekkel jekkel left a comment

Choose a reason for hiding this comment

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

Can you potentially write a small test scenario? This would involve:

  • adjusting ./test/server/server.py to be able to test whether headers are sent along
  • adjust ./test/resources/sidecar.yaml to configure a new sidecar instance or reconfigure an existing one to use request headers (also make sure it's configured with the REQ_URL feature)
  • let a configmap entry of a configmap within ./test/resources/resources.yaml point to the locally deployed webserver
  • in the github test workflow add appropriate file downloads and verifications.

README.md Outdated
@@ -71,6 +71,7 @@ If the filename ends with `.url` suffix, the content will be processed as a URL
| `REQ_TIMEOUT` | How many seconds to wait for the server to send data before giving up for `.url` triggered requests or requests to `REQ_URI` (does not apply to k8s api requests) | false | `10` | float |
| `REQ_USERNAME` | Username to use for basic authentication for requests to `REQ_URL` and for `*.url` triggered requests | false | - | string |
| `REQ_PASSWORD` | Password to use for basic authentication for requests to `REQ_URL` and for `*.url` triggered requests | false | - | string |
| `REQ_HEADERS` | Headers for use for reqeusts to `REQ_URL` and for `*.url` triggered requets | `` | - | string |
Copy link
Member

Choose a reason for hiding this comment

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

there are two typos (reqeusts and requets) and please add an example value (for example {"x-apikey":"token"} if that's the expected format)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the delay on this and thanks for letting me know. I've fixed the spelling issues. Going to work on the tests now

@ethanchowell
Copy link

Any active work on this? I came across it looking for this functionality. Happy to pick it up if OP is no longer maintaining it!

@github-actions github-actions bot added the stale close issues and PRs after 60 days of inactivity label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale close issues and PRs after 60 days of inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants