aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Models/ServerCorsPolicy.cs
blob: ae010c042e30445978cb6cfd5c0582ebfb9dc67b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using Microsoft.AspNetCore.Cors.Infrastructure;

namespace Jellyfin.Server.Models
{
    /// <summary>
    /// Server Cors Policy.
    /// </summary>
    public static class ServerCorsPolicy
    {
        /// <summary>
        /// Default policy name.
        /// </summary>
        public const string DefaultPolicyName = "DefaultCorsPolicy";

        /// <summary>
        /// Default Policy. Allow Everything.
        /// </summary>
        public static readonly CorsPolicy DefaultPolicy = new CorsPolicy
        {
            // Allow any origin
            Origins = { "*" },

            // Allow any method
            Methods = { "*" },

            // Allow any header
            Headers = { "*" }
        };
    }
}