Skip to content

Commit 69f4125

Browse files
antoninkrizmadskristensen
authored andcommitted
Explicit HttpMethod bindings to PwaController (#62)
Added explicit HttpMethod bindings to add compatibility with Swashbuckle (Swagger) to prevent following issue TrilonIO/aspnetcore-angular-universal#656
1 parent 4110646 commit 69f4125

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/PwaController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public PwaController(PwaOptions options)
2727
/// Serves a service worker based on the provided settings.
2828
/// </summary>
2929
[Route(Constants.ServiceworkerRoute)]
30+
[HttpGet]
3031
public async Task<IActionResult> ServiceWorkerAsync()
3132
{
3233
Response.ContentType = "application/javascript; charset=utf-8";
@@ -52,6 +53,7 @@ public async Task<IActionResult> ServiceWorkerAsync()
5253
/// Serves the offline.html file
5354
/// </summary>
5455
[Route(Constants.Offlineroute)]
56+
[HttpGet]
5557
public async Task<IActionResult> OfflineAsync()
5658
{
5759
Response.ContentType = "text/html";
@@ -66,9 +68,10 @@ public async Task<IActionResult> OfflineAsync()
6668
}
6769

6870
/// <summary>
69-
/// Serves the offline.html file
71+
/// Serves the manifest.json file
7072
/// </summary>
7173
[Route(Constants.WebManifestRoute)]
74+
[HttpGet]
7275
public IActionResult WebManifest([FromServices] WebManifest wm)
7376
{
7477
if (wm == null)

0 commit comments

Comments
 (0)