Esempio n. 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddCors(options =>
            {
                options.AddPolicy("AllowAll",
                                  builder =>
                {
                    builder.AllowAnyOrigin()
                    .AllowAnyMethod()
                    .AllowAnyHeader();
                });
            });


            services.AddControllers();

            Configdependecyinjection.Setup(services, Configuration);
            DataDiConfig.Setup(services, Configuration);
            ConfigureDi.Setup(services);
            services.AddAutoMapper(typeof(AutoMapperProfile));
            //Auth
            JwtAuthConfig.Setup(services, Configuration);

            //services.AddDirectoryBrowser();
        }
Esempio n. 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddCors(o => o.AddPolicy("TestCors", builder =>
            {
                builder.AllowAnyOrigin()
                .AllowAnyMethod()
                .AllowAnyHeader();
            }));


            services.AddControllers();

            Configdependecyinjection.Setup(services, Configuration);
            DataDiConfig.Setup(services, Configuration);
            ConfigureDi.Setup(services);

            //Auth
            JwtAuthConfig.Setup(services, Configuration);

            //services.AddDirectoryBrowser();
        }