src/packages/EmbedIO/WebModuleContainerExtensions-Cors.cs
/// <summary>
/// Creates an instance of <see cref="CorsModule"/> and adds it to a module container.
/// </summary>
/// <typeparam name="TContainer">The type of the module container.</typeparam>
/// <param name="this">The <typeparamref name="TContainer"/> on which this method is called.</param>
/// <param name="origins">The valid origins. Default is <c>"*"</c>, meaning all origins.</param>
/// <param name="headers">The valid headers. Default is <c>"*"</c>, meaning all headers.</param>
/// <param name="methods">The valid method. Default is <c>"*"</c>, meaning all methods.</param>
/// <returns><paramref name="this"/> with a <see cref="CorsModule"/> added.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <seealso cref="CorsModule"/>
Creates an instance of  and adds it to a module container.
Creates an instance of and adds it to a module container .
public static TContainer WithCors<TContainer>(
            this TContainer @this,
            string origins = CorsModule.All,
            string headers = CorsModule.All,
            string methods = CorsModule.All)
            where TContainer : class, IWebModuleContainer
            => WithCors(@this, UrlPath.Root, origins, headers, methods);
public static TContainer WithCors < TContainer > ( this TContainer @this , string origins = CorsModule . All , string headers = CorsModule . All , string methods = CorsModule . All ) where TContainer : class , IWebModuleContainer => WithCors ( @this , UrlPath . Root , origins , headers , methods ) ;
Creates an instance of  and adds it to a module container.
Creates an instance of and adds it to a module container .
with a  added.
with a added .
None
TContainer
this
origins
string
The valid origins. Default is "*"
The valid origins . Default is " * "
headers
string
The valid headers. Default is "*"
The valid headers . Default is " * "
methods
string
The valid method. Default is "*"
The valid method . Default is " * "
this
The  on which this method is called.
The on which this method is called .
typeparam
The type of the module container.
The type of the module container .
seealso
None