diff options
| author | 2025-05-31 19:15:39 +0200 | |
|---|---|---|
| committer | 2025-05-31 19:15:39 +0200 | |
| commit | 025ca487cf016c279d822372993e1704d06cd50d (patch) | |
| tree | beae929165349b92b3c6b705f5e7bd60c8450fe5 /internal/config/validate.go | |
| parent | [performance] cache mute check results (#4202) (diff) | |
| download | gotosocial-025ca487cf016c279d822372993e1704d06cd50d.tar.xz | |
[feature/internal/httpclient] add option to configure outgoing protocol (#4134)
# Description
Adds a configuration option to set the outgoing transport of HTTP requests for testing purposes.
## Checklist
- [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [x] I/we have not leveraged AI to create the proposed changes.
- [x] I/we have performed a self-review of added code.
- [x] I/we have written code that is legible and maintainable by others.
- [ ] I/we have commented the added code, particularly in hard-to-understand areas.
- [x] I/we have made any necessary changes to documentation.
- [ ] I/we have added tests that cover new code.
- [ ] I/we have run tests and they pass locally with the changes.
- [ ] I/we have run `go fmt ./...` and `golangci-lint run`.
- Note: `go fmt` yes, golangci-lint fails, can't load any configuration
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4134
Reviewed-by: kim <gruf@noreply.codeberg.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
Diffstat (limited to 'internal/config/validate.go')
| -rw-r--r-- | internal/config/validate.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/config/validate.go b/internal/config/validate.go index f1c50e4a1..2b4e64662 100644 --- a/internal/config/validate.go +++ b/internal/config/validate.go @@ -181,5 +181,13 @@ func Validate() error { ) } + // http-client.insecure-outgoing + if GetHTTPClientInsecureOutgoing() { + log.Warn(nil, "http-client.insecure-outgoing was set to TRUE. "+ + "*****THIS SHOULD BE USED FOR TESTING ONLY, IF YOU TURN THIS ON WHILE "+ + "IF IN DOUBT, STOP YOUR SERVER *NOW* AND ADJUST YOUR CONFIGURATION!*****", + ) + } + return errs.Combine() } |
