Esempio n. 1
0
 internal static CorsConfigurationAllowProperties Clone(this CorsConfigurationAllowProperties other)
 {
     return(new CorsConfigurationAllowProperties
     {
         AllowAllMethods = other.AllowAllMethods,
         AllowAllRequestedHeaders = other.AllowAllRequestedHeaders,
         AllowAnyOrigin = other.AllowAnyOrigin,
         AllowCookies = other.AllowCookies,
         Methods = other.Methods.ToArray(),
         RequestHeaders = other.RequestHeaders.ToArray(),
         ResponseHeaders = other.ResponseHeaders.ToArray(),
         CacheDuration = other.CacheDuration
     });
 }
Esempio n. 2
0
        internal static CorsConfigurationEntry EntryFromAllowProperties(this CorsConfigurationAllowProperties other, CorsAccessRequest accessRequest)
        {
            return(new CorsConfigurationEntry
            {
                AllResources = false,
                Resource = accessRequest.Resource,
                Origin = accessRequest.Origin,

                AllowAllMethods = other.AllowAllMethods,
                AllowAllRequestedHeaders = other.AllowAllRequestedHeaders,
                AllowAnyOrigin = other.AllowAnyOrigin,
                AllowCookies = other.AllowCookies,
                Methods = other.Methods.ToArray(),
                RequestHeaders = other.RequestHeaders.ToArray(),
                ResponseHeaders = other.ResponseHeaders.ToArray(),
                CacheDuration = other.CacheDuration
            });
        }