File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 . AddHttpClient ( )
77 . Build ( ) ;
88
9- app . UseCors ( ) ;
9+ app . UseCors ( builder => builder
10+ . WithOrigins ( "https://capybara-pro-code.github.io" )
11+ . AllowAnyHeader ( )
12+ . AllowAnyMethod ( ) ) ;
1013app . UseRouting ( ) ;
1114app . UseMetricServer ( ) ;
1215app . MapGet ( "/" , ( ) => new ApplicationInfoDto ( Constants . ApplicationStartDate ) ) ;
Original file line number Diff line number Diff line change 99
1010builder . Services . AddScoped < RenewBackendUrlHandler > ( ) ;
1111builder . Services . AddScoped < BackendService > ( ) ;
12- builder . Services . AddScoped ( _ => new HttpClient { BaseAddress = new Uri ( builder . HostEnvironment . BaseAddress ) } ) ;
12+ builder . Services . AddScoped ( _ => new HttpClient {
13+ BaseAddress = new Uri ( builder . HostEnvironment . BaseAddress ) ,
14+ DefaultRequestHeaders = {
15+ { "bypass-tunnel-reminder" , "true" }
16+ }
17+ } ) ;
1318
1419await builder . Build ( ) . RunAsync ( ) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ public class BackendService : IDisposable {
77 private readonly HttpClient _httpClient ;
88
99 public BackendService ( RenewBackendUrlHandler renewBackendUrlHandler ) {
10- _httpClient = new HttpClient ( renewBackendUrlHandler ) { BaseAddress = new Uri ( "https://lhr.life" ) } ;
10+ _httpClient = new HttpClient ( renewBackendUrlHandler ) {
11+ BaseAddress = new Uri ( "https://lhr.life" ) ,
12+ DefaultRequestHeaders = { { "bypass-tunnel-reminder" , "true" } }
13+ } ;
1114 }
1215
1316 public async Task < DateTimeOffset > GetApplicationStartDate ( ) {
You can’t perform that action at this time.
0 commit comments