You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-7
Original file line number
Diff line number
Diff line change
@@ -165,7 +165,7 @@ Both packages provide a different feature set and have those advantages:
165
165
- global logging
166
166
- auto-configured log channel `http-client` to log to a separate `http-client.log` file
167
167
- Full support of [Guzzle MessageFormatter](https://github.com/guzzle/guzzle/blob/master/src/MessageFormatter.php) variable substitutions for highly customized log messages.
168
-
- obfuscation of credentials in HTTP Client requests
168
+
-basic obfuscation of credentials in HTTP Client requests
@@ -175,27 +175,34 @@ So, my recommendation: If you need global logging without any extra configuratio
175
175
176
176
## Caveats
177
177
178
-
- This package currently uses two different implementations for logging. In the preferred variant 1 (global logging), it is currently not possible to configure the [log channel name](https://laravel.com/docs/logging#configuring-the-channel-name) which defaults to current environment, such as `production` or `local`. If you with to use Laravel HTTP Client to access multiple different external APIs, it is nice to explicitely distinguish between them by different log channel names.
178
+
- This package currently uses two different implementations for logging. In the preferred variant 1 or 3 (global logging), it is currently not possible to configure the [log channel name](https://laravel.com/docs/logging#configuring-the-channel-name) which defaults to current environment, such as `production` or `local`. If you with to use Laravel HTTP Client to access multiple different external APIs, it is nice to explicitly distinguish between them by different log channel names.
179
179
180
180
As a workaround, I have implemented another way of logging through `Http::log()` method as mixin. But of course, we should combine both variants into a single one for a cleaner codebase.
181
181
182
-
- Very basic obfuscation support using regex with lookbehind assertions (e.g. `/(?<=Authorization:\sBearer ).*/m`, modifying formatted log output. It's currently not possible to directly modify request headers or JSON data in request body.
182
+
- Obfuscation
183
+
184
+
- Body keys: Very basic obfuscation support using regex with lookbehind assertions (e.g. `/(?<="token":").*(?=")/mU`, modifying formatted log output. It's currently not possible to directly modify JSON data in request body.
185
+
186
+
- No obfuscation of query params, e.g. on a POST request to an OAuth2 token endpoint.
187
+
188
+
- Obfuscation currently only works in variant 1 or 3 (global logging).
183
189
184
-
- Obfuscation currently only works in variant 1 (global logging).
185
190
186
191
## Testing
187
192
188
-
TBD.
193
+
Currently, there is very basic code/test coverage. We're using [PEST](https://pestphp.com/), so just run all tests like so:
189
194
190
-
(any help appreciated!)
195
+
```bash
196
+
$ ./vendor/bin/pest
197
+
```
191
198
192
199
## Changes
193
200
194
201
All changes are listed in [CHANGELOG](CHANGELOG.md)
195
202
196
203
## Authors
197
204
198
-
Author of this shitty little package is**[Philip Iezzi (Onlime GmbH)](https://www.onlime.ch/)**.
205
+
Made with ❤️ by**[Philip Iezzi (Onlime GmbH)](https://www.onlime.ch/)**.
0 commit comments