Merge branch 'master' into feature/tasks-controller
This commit is contained in:
commit
c3833b1b04
|
@ -26,6 +26,12 @@ namespace ScrumTaskboard
|
||||||
// This method gets called by the runtime. Use this method to add services to the container.
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
services.AddCors(o => o.AddPolicy("AllowAll", builder =>
|
||||||
|
{
|
||||||
|
builder.AllowAnyOrigin()
|
||||||
|
.AllowAnyMethod()
|
||||||
|
.AllowAnyHeader();
|
||||||
|
}));
|
||||||
services.AddScoped(serviceProvider => new TaskContext(
|
services.AddScoped(serviceProvider => new TaskContext(
|
||||||
new DbContextOptionsBuilder<TaskContext>()
|
new DbContextOptionsBuilder<TaskContext>()
|
||||||
.UseNpgsql("Host=nig.gl; Port=8543; Username=scrum; Database=taskboard; Password=c6gXud7YvBWp2sgxSgy4wRN")
|
.UseNpgsql("Host=nig.gl; Port=8543; Username=scrum; Database=taskboard; Password=c6gXud7YvBWp2sgxSgy4wRN")
|
||||||
|
@ -47,7 +53,8 @@ namespace ScrumTaskboard
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
//app.UseHttpsRedirection();
|
||||||
|
app.UseCors("AllowAll");
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "5001:80"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db-data:
|
db-data:
|
Loading…
Reference in New Issue