allow CORS

This commit is contained in:
2018-02-28 23:45:49 -05:00
parent 152a000927
commit 5c74e2016a
4 changed files with 14 additions and 0 deletions

View File

@ -1,12 +1,14 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace YTManager.Controllers {
[Produces("application/json")]
[Route("api/Channels")]
[EnableCors("AllowAllOrigins")]
public class ChannelsController : Controller {
// Custom return type for API accesses. Done this way to ensure we
// always return the expected data regardless of the underlying model.