CorsMiddlewareExtensions.UseCors Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Overload
UseCors(IApplicationBuilder) |
Menambahkan middleware CORS ke alur aplikasi web Anda untuk memungkinkan permintaan lintas domain. |
UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>) |
Menambahkan middleware CORS ke alur aplikasi web Anda untuk memungkinkan permintaan lintas domain. |
UseCors(IApplicationBuilder, String) |
Menambahkan middleware CORS ke alur aplikasi web Anda untuk memungkinkan permintaan lintas domain. |
UseCors(IApplicationBuilder)
- Sumber:
- CorsMiddlewareExtensions.cs
- Sumber:
- CorsMiddlewareExtensions.cs
- Sumber:
- CorsMiddlewareExtensions.cs
Menambahkan middleware CORS ke alur aplikasi web Anda untuk memungkinkan permintaan lintas domain.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCors(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseCors : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCors (app As IApplicationBuilder) As IApplicationBuilder
Parameter
IApplicationBuilder diteruskan ke metode Konfigurasi Anda
Mengembalikan
Parameter aplikasi asli
Berlaku untuk
UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>)
- Sumber:
- CorsMiddlewareExtensions.cs
- Sumber:
- CorsMiddlewareExtensions.cs
- Sumber:
- CorsMiddlewareExtensions.cs
Menambahkan middleware CORS ke alur aplikasi web Anda untuk memungkinkan permintaan lintas domain.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCors(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^> ^ configurePolicy);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> configurePolicy);
static member UseCors : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCors (app As IApplicationBuilder, configurePolicy As Action(Of CorsPolicyBuilder)) As IApplicationBuilder
Parameter
IApplicationBuilder diteruskan ke metode Konfigurasi Anda.
- configurePolicy
- Action<CorsPolicyBuilder>
Delegasi yang dapat menggunakan penyusun kebijakan untuk membangun kebijakan.
Mengembalikan
Parameter aplikasi asli
Berlaku untuk
UseCors(IApplicationBuilder, String)
- Sumber:
- CorsMiddlewareExtensions.cs
- Sumber:
- CorsMiddlewareExtensions.cs
- Sumber:
- CorsMiddlewareExtensions.cs
Menambahkan middleware CORS ke alur aplikasi web Anda untuk memungkinkan permintaan lintas domain.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCors(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, System::String ^ policyName);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string policyName);
static member UseCors : Microsoft.AspNetCore.Builder.IApplicationBuilder * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCors (app As IApplicationBuilder, policyName As String) As IApplicationBuilder
Parameter
IApplicationBuilder diteruskan ke metode Konfigurasi Anda
- policyName
- String
Nama kebijakan dari kebijakan yang dikonfigurasi.
Mengembalikan
Parameter aplikasi asli