diff --git a/docs/core/api/app.md b/docs/core/api/app.md index d44944f7ddb..2fd98d65383 100644 --- a/docs/core/api/app.md +++ b/docs/core/api/app.md @@ -664,4 +664,4 @@ Hooks is a method to return [hooks](../guide/hooks.md) property. ```go title="Signature" func (app *App) Hooks() *Hooks -``` +``` \ No newline at end of file diff --git a/docs/core/api/middleware/cors.md b/docs/core/api/middleware/cors.md index 6fe996774e9..2e48d1c9a1a 100644 --- a/docs/core/api/middleware/cors.md +++ b/docs/core/api/middleware/cors.md @@ -214,4 +214,4 @@ When configuring CORS, misconfiguration can potentially expose your application - **Inadequate `AllowOriginsFunc` Validation**: When using `AllowOriginsFunc` for dynamic origin validation, ensure the function includes robust checks to prevent unauthorized origins from being accepted. Overly permissive validation can lead to security vulnerabilities. Never allow `AllowOriginsFunc` to return `true` for all origins. This is particularly crucial when `AllowCredentials` is set to `true`. Doing so can bypass the restriction of using a wildcard origin with credentials, exposing your application to serious security threats. If you need to allow wildcard origins, use `AllowOrigins` with a wildcard `"*"` instead of `AllowOriginsFunc`. -Remember, the key to secure CORS configuration is specificity and caution. By carefully selecting which origins, methods, and headers are allowed, you can help protect your application from cross-origin attacks. \ No newline at end of file +Remember, the key to secure CORS configuration is specificity and caution. By carefully selecting which origins, methods, and headers are allowed, you can help protect your application from cross-origin attacks.