Beispiel #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, OpenSundayContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            // Ensure DB tables exist
            context.Database.EnsureCreated();

            // Add Authentication to the middleware pipeline
            app.UseAuthentication();

            // Don't use HTTPS redirection, as this will be handled by a proxy on the server
            //app.UseHttpsRedirection();

            // Enable CORS
            app.UseCors();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers().RequireAuthorization();
            });
        }
 public LocationsController(OpenSundayContext context)
 {
     _context = context;
 }
Beispiel #3
0
 public ReviewsController(OpenSundayContext context)
 {
     _context = context;
 }
Beispiel #4
0
 public PlacesController(OpenSundayContext context)
 {
     _context = context;
 }
Beispiel #5
0
 public UsersController(OpenSundayContext context)
 {
     _context = context;
 }
 public CategoriesController(OpenSundayContext context)
 {
     _context = context;
 }
Beispiel #7
0
 public ReportsController(OpenSundayContext context)
 {
     _context = context;
 }
Beispiel #8
0
 public CitiesController(OpenSundayContext context)
 {
     _context = context;
 }
Beispiel #9
0
 public TypesController(OpenSundayContext context)
 {
     _context = context;
 }
Beispiel #10
0
 public RegionsController(OpenSundayContext context)
 {
     _context = context;
 }