File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/Middleware/Spa/SpaProxy/src Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 77using System . Diagnostics ;
88using System . IO ;
99using System . Net . Http ;
10+ using System . Net . Http . Headers ;
1011using System . Threading ;
1112using System . Threading . Tasks ;
1213
@@ -37,6 +38,9 @@ public void StartInBackground(CancellationToken cancellationToken)
3738 // It's ok for us to do this here since this service is only plugged in during development.
3839 ServerCertificateCustomValidationCallback = HttpClientHandler . DangerousAcceptAnyServerCertificateValidator
3940 } ) ;
41+ // Certain frontend build tools rely on the the ACCEPT Header being set, otherwise these tools
42+ // might be unable to perform their client-side fallback logic.
43+ httpClient . DefaultRequestHeaders . Accept . Add ( new MediaTypeWithQualityHeaderValue ( "*/*" ) ) ;
4044 _logger . LogInformation ( $ "No SPA development server running at { _options . ServerUrl } found.") ;
4145
4246 // We are not waiting for the SPA proxy to launch, instead we are going to rely on a piece of
You can’t perform that action at this time.
0 commit comments