File tree Expand file tree Collapse file tree
src/UniGetUI.Interface.BackgroundApi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,8 +54,6 @@ public async Task Start()
5454 Settings . SetValue ( "CurrentSessionToken" , ApiTokenHolder . Token ) ;
5555 Logger . Info ( "Randomly-generated background API auth token: " + ApiTokenHolder . Token ) ;
5656
57- _running = true ;
58-
5957 var builder = Host . CreateDefaultBuilder ( ) ;
6058 builder . ConfigureServices ( services => services . AddCors ( ) ) ;
6159 builder . ConfigureWebHostDefaults ( webBuilder =>
@@ -66,7 +64,6 @@ public async Task Start()
6664#endif
6765 webBuilder . Configure ( app =>
6866 {
69- // Enable CORS
7067 app . UseCors ( policy => policy
7168 . AllowAnyOrigin ( )
7269 . AllowAnyMethod ( )
@@ -95,6 +92,7 @@ public async Task Start()
9592 webBuilder . UseUrls ( "http://localhost:7058" ) ;
9693 } ) ;
9794 _host = builder . Build ( ) ;
95+ _running = true ;
9896 await _host . StartAsync ( ) ;
9997 Logger . Info ( "Api running on http://localhost:7058" ) ;
10098 }
You can’t perform that action at this time.
0 commit comments