Moved middleware configuration to separated file
This commit is contained in:
		
							
								
								
									
										19
									
								
								SchengenVisaApi/SchengenVisaApi/RequestPipeline.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								SchengenVisaApi/SchengenVisaApi/RequestPipeline.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| namespace SchengenVisaApi | ||||
| { | ||||
|     /// Provides methods for configuring middleware | ||||
|     public static class PipelineRequest | ||||
|     { | ||||
|         /// Configure general middleware | ||||
|         public static WebApplication ConfigurePipelineRequest(this WebApplication app) | ||||
|         { | ||||
|             app.UseSwagger() | ||||
|                 .UseSwaggerUI(); | ||||
|  | ||||
|             app.UseHttpsRedirection(); | ||||
|  | ||||
|             app.MapControllers(); | ||||
|  | ||||
|             return app; | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user