GoogleContainerTools / GoogleContainerTools/jib
No full controll over User-Agent header
- Dominant language
- Java
- Stars
- 14.5k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Description of the issue**:
Currently JIB allows to control part of the User-Agent header via `_JIB_DISABLE_USER_AGENT` and `_JIB_UPSTREAM_CLIENT` properties. But the ending part `Google-HTTP-Java-Client/1.34.0 (gzip)` is always in place. This suffix can be turned off via [HttpRequest.setSuppressUserAgentSuffix](https://github.com/googleapis/google-http-java-client/blob/ea0f6c0f58e8abffae1362feb344a9309d6d814e/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#L787). Could you provide a corresponding property on the JIB side to turn it off?
Ideally it there should be a way to turn User-Agent off completely, defined a custom User-Agent or use the default one.
**Expected behavior**:
```
./gradlew jib -D_JIB_USER_AGENT="my-custom-agent" -> User-Agent: my-custom-agent
./gradlew jib -D_JIB_USER_AGENT_OFF="true" -> ''
./gradlew jib -> User-Agent: jib 3.3.0 jib-gradle-plugin Google-HTTP-Java-Client/1.34.0 (gzip)
```
Contributor guide
Assessment
This issue has not been assessed yet.