Enable CORS
This commit is contained in:
@ -2,6 +2,7 @@ using System.Security.Cryptography;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using BTCPayServer.Lightning;
|
using BTCPayServer.Lightning;
|
||||||
using LNURL;
|
using LNURL;
|
||||||
|
using Microsoft.AspNetCore.Cors;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Nostr.Client.Json;
|
using Nostr.Client.Json;
|
||||||
@ -13,6 +14,7 @@ using NostrStreamer.Services;
|
|||||||
namespace NostrStreamer.Controllers;
|
namespace NostrStreamer.Controllers;
|
||||||
|
|
||||||
[Route("/api/pay")]
|
[Route("/api/pay")]
|
||||||
|
[EnableCors]
|
||||||
public class LnurlController : Controller
|
public class LnurlController : Controller
|
||||||
{
|
{
|
||||||
private readonly Config _config;
|
private readonly Config _config;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Cors;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Nostr.Client.Json;
|
using Nostr.Client.Json;
|
||||||
using Nostr.Client.Messages;
|
|
||||||
using NostrStreamer.ApiModel;
|
using NostrStreamer.ApiModel;
|
||||||
using NostrStreamer.Database;
|
using NostrStreamer.Database;
|
||||||
using NostrStreamer.Services;
|
using NostrStreamer.Services;
|
||||||
@ -13,6 +13,7 @@ using NostrStreamer.Services.StreamManager;
|
|||||||
namespace NostrStreamer.Controllers;
|
namespace NostrStreamer.Controllers;
|
||||||
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
|
[EnableCors]
|
||||||
[Route("/api/nostr")]
|
[Route("/api/nostr")]
|
||||||
public class NostrController : Controller
|
public class NostrController : Controller
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using MediaFormatLibrary.MP4;
|
using MediaFormatLibrary.MP4;
|
||||||
|
using Microsoft.AspNetCore.Cors;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using NostrStreamer.Database;
|
using NostrStreamer.Database;
|
||||||
using NostrStreamer.Services;
|
using NostrStreamer.Services;
|
||||||
@ -8,6 +9,7 @@ using NostrStreamer.Services.StreamManager;
|
|||||||
namespace NostrStreamer.Controllers;
|
namespace NostrStreamer.Controllers;
|
||||||
|
|
||||||
[Route("/api/playlist")]
|
[Route("/api/playlist")]
|
||||||
|
[EnableCors]
|
||||||
public class PlaylistController : Controller
|
public class PlaylistController : Controller
|
||||||
{
|
{
|
||||||
private readonly ILogger<PlaylistController> _logger;
|
private readonly ILogger<PlaylistController> _logger;
|
||||||
|
Reference in New Issue
Block a user