diff --git a/Dockerfile b/Dockerfile index 69a5dee..a7adde3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN mkdir -p /app/persistence /app/wwwroot/downloads/sqlite /app/logs # Volumes VOLUME ["/app/persistence", "/app/wwwroot/downloads/sqlite", "/app/logs"] -# Expose Port 80 und 443 (HTTP + HTTPS) +# Expose Port 5000 EXPOSE 5000 ENV ASPNETCORE_URLS=http://*:5000 ENV ASPNETCORE_ENVIRONMENT=Development diff --git a/Watcher/Controllers/ServerController.cs b/Watcher/Controllers/ServerController.cs index 0126f82..4247c65 100644 --- a/Watcher/Controllers/ServerController.cs +++ b/Watcher/Controllers/ServerController.cs @@ -6,7 +6,7 @@ using Watcher.Models; using Watcher.ViewModels; [Authorize] -[Route("Server")] +[Route("[controller]")] public class ServerController : Controller { private readonly AppDbContext _context; @@ -79,7 +79,7 @@ public class ServerController : Controller } // GET: Server/Edit/5 - + [HttpGet("EditServer/[id]")] public async Task EditServer(int id) { var server = await _context.Servers.FindAsync(id); @@ -96,7 +96,7 @@ public class ServerController : Controller } // POST: Server/Edit/5 - [HttpPost] + [HttpPost("EditServer/{id}")] [ValidateAntiForgeryToken] public async Task EditServer(int id, EditServerViewModel vm) { @@ -130,7 +130,7 @@ public class ServerController : Controller } // GET: Server/Details/5 - [HttpGet("Details")] + [HttpGet("Details/{id}")] public async Task Details(int id) { diff --git a/Watcher/Views/Server/AddServer.cshtml b/Watcher/Views/Server/AddServer.cshtml index e1b0596..0b35625 100644 --- a/Watcher/Views/Server/AddServer.cshtml +++ b/Watcher/Views/Server/AddServer.cshtml @@ -10,6 +10,7 @@
+ @Html.AntiForgeryToken()
diff --git a/Watcher/Views/_ViewStart.cshtml b/Watcher/Views/_ViewStart.cshtml index a5f1004..7eeb1f0 100644 --- a/Watcher/Views/_ViewStart.cshtml +++ b/Watcher/Views/_ViewStart.cshtml @@ -1,3 +1,4 @@ @{ Layout = "_Layout"; } +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers \ No newline at end of file