mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-31 15:21:00 +08:00
Add configuration for CORS allowed headers (#21747)
This PR enhances the CORS middleware usage by allowing for the headers to be configured in `app.ini`. Fixes #21746 Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@ -200,6 +200,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
||||
- `METHODS`: **GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS**: list of methods allowed to request
|
||||
- `MAX_AGE`: **10m**: max time to cache response
|
||||
- `ALLOW_CREDENTIALS`: **false**: allow request with credentials
|
||||
- `HEADERS`: **Content-Type,User-Agent**: additional headers that are permitted in requests
|
||||
- `X_FRAME_OPTIONS`: **SAMEORIGIN**: Set the `X-Frame-Options` header value.
|
||||
|
||||
## UI (`ui`)
|
||||
|
Reference in New Issue
Block a user