mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-11-15 17:57:27 +01:00
Add allow all CORS policy to download endpoints
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Net;
|
||||
using Microsoft.AspNetCore.Cors;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VoidCat.Model;
|
||||
using VoidCat.Model.Payments;
|
||||
@@ -28,6 +29,7 @@ public class DownloadController : Controller
|
||||
|
||||
[HttpOptions]
|
||||
[Route("{id}")]
|
||||
[EnableCors("*")]
|
||||
public Task DownloadFileOptions([FromRoute] string id)
|
||||
{
|
||||
var gid = id.FromBase58Guid();
|
||||
@@ -41,6 +43,7 @@ public class DownloadController : Controller
|
||||
[ResponseCache(Location = ResponseCacheLocation.Any, Duration = 86400)]
|
||||
[HttpGet]
|
||||
[Route("{id}")]
|
||||
[EnableCors("*")]
|
||||
public async Task DownloadFile([FromRoute] string id)
|
||||
{
|
||||
var gid = id.FromBase58Guid();
|
||||
|
||||
Reference in New Issue
Block a user