mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00: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:
@@ -1138,6 +1138,9 @@ ROUTER = console
|
||||
;; allow request with credentials
|
||||
;ALLOW_CREDENTIALS = false
|
||||
;;
|
||||
;; headers to permit
|
||||
;HEADERS = Content-Type,User-Agent
|
||||
;;
|
||||
;; set X-FRAME-OPTIONS header
|
||||
;X_FRAME_OPTIONS = SAMEORIGIN
|
||||
|
||||
|
Reference in New Issue
Block a user