Skip to content

Commit c0300ce

Browse files
authored
Included requested-by header in ProxyServerAssetReader (#2129)
1 parent 5769956 commit c0300ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dwds/lib/src/readers/proxy_server_asset_reader.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ class ProxyServerAssetReader implements AssetReader {
4949
Future<String?> _readResource(String path) async {
5050
// Handlers expect a fully formed HTML URI. The actual hostname and port
5151
// does not matter.
52-
final response =
53-
await _handler(Request('GET', Uri.parse('http://foo:0000/$path')));
52+
final request = Request('GET', Uri.parse('http://foo:0000/$path'))
53+
.change(headers: {'requested-by': 'DWDS'});
54+
final response = await _handler(request);
5455

5556
if (response.statusCode != HttpStatus.ok) {
5657
_logger.warning('''

0 commit comments

Comments
 (0)