mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #3323 from Infisical/feat/allowCustomHeadersOnCLI
Feat/allow custom headers on cli
This commit is contained in:
@@ -33,3 +33,28 @@ Yes. This is simply a configuration file and contains no sensitive data.
|
||||
https://app.infisical.com/project/<your_project_id>/settings
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="How do I use custom headers with the Infisical CLI?">
|
||||
|
||||
The Infisical CLI supports custom HTTP headers for requests to servers that require additional authentication. Set these headers using the `INFISICAL_CUSTOM_HEADERS` environment variable:
|
||||
|
||||
```bash
|
||||
export INFISICAL_CUSTOM_HEADERS="Access-Client-Id=your-client-id Access-Client-Secret=your-client-secret"
|
||||
```
|
||||
|
||||
After setting this environment variable, run your Infisical commands as usual.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Why would I need to use custom headers?">
|
||||
|
||||
Custom headers are necessary when your Infisical server is protected by services like Cloudflare Access or other reverse proxies that require specific authentication headers. Without this feature, you would need to implement security workarounds that might compromise your security posture.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="What format should I use for the custom headers?">
|
||||
|
||||
Custom headers should be specified in the format `headername1=headervalue1 headername2=headervalue2`, with spaces separating each header-value pair. For example:
|
||||
|
||||
```bash
|
||||
export INFISICAL_CUSTOM_HEADERS="Header1=value1 Header2=value2 Header3=value3"
|
||||
```
|
||||
</Accordion>
|
||||
@@ -120,6 +120,22 @@ The CLI is designed for a variety of secret management applications ranging from
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<Tip>
|
||||
## Custom Request Headers
|
||||
|
||||
The Infisical CLI supports custom HTTP headers for requests to servers protected by authentication services such as Cloudflare Access. Configure these headers using the `INFISICAL_CUSTOM_HEADERS` environment variable:
|
||||
|
||||
```bash
|
||||
# Syntax: headername1=headervalue1 headername2=headervalue2
|
||||
export INFISICAL_CUSTOM_HEADERS="Access-Client-Id=your-client-id Access-Client-Secret=your-client-secret"
|
||||
|
||||
# Execute Infisical commands after setting the environment variable
|
||||
infisical secrets ls
|
||||
```
|
||||
|
||||
This functionality enables secure interaction with Infisical instances that require specific authentication headers.
|
||||
</Tip>
|
||||
|
||||
## History
|
||||
|
||||
Your terminal keeps a history with the commands you run. When you create Infisical secrets directly from your terminal, they'll stay there for a while.
|
||||
|
||||
Reference in New Issue
Block a user