hasura / hasura/graphql-engine
Action headers not loading environment variable with space in value
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v2.15.1
### Environment
Hasura running in Docker container
### What is the current behaviour?
When setting up an action with Headers from env var, variables with spaces in them are not sent. I have quoted the environment variable in my .env file when starting the docker container, but this doesn't work.
### What is the expected behaviour?
The entire header is sent, space and all.
### How to reproduce the issue?
1. Create an environment file with a value that has a header inside
for example
```
AUTHORIZATION="Bearer 123412341234"
```
2. Start Hasura container and load the environment variable
3. Create an action that sends the environment variable as a header value
### Please provide any traces or logs that could help here.
I get this as the response when attempting to run the action while it's using the environment variable
```
{
"errors": [
{
"extensions": {
"code": "unexpected",
"path": "$"
},
"message": "OAuth token is missing"
}
]
}
```
### Any possible solutions/workarounds you're aware of?
It works correctly if I put the value of the header in directly
### Keywords
- environment variable
- space
- .env
Contributor guide
Assessment
This issue has not been assessed yet.