summaryrefslogtreecommitdiffstats
path: root/custom
diff options
context:
space:
mode:
authorTamal Saha <tamal@appscode.com>2019-05-13 08:38:53 -0700
committertechknowlogick <techknowlogick@gitea.io>2019-05-13 11:38:53 -0400
commit34d06f4c6b23dfc458d51e9e3827c9400a87e84d (patch)
treea68b3f707251a11383ff056debfb1a933c0729d2 /custom
parent6fb58a8cdcd76aa45902e50da8f2b450fe9d3d35 (diff)
downloadgitea-34d06f4c6b23dfc458d51e9e3827c9400a87e84d.tar.gz
gitea-34d06f4c6b23dfc458d51e9e3827c9400a87e84d.zip
Handle CORS requests (#6289)
Diffstat (limited to 'custom')
-rw-r--r--custom/conf/app.ini.sample17
1 files changed, 17 insertions, 0 deletions
diff --git a/custom/conf/app.ini.sample b/custom/conf/app.ini.sample
index 6f7844962b..599569464c 100644
--- a/custom/conf/app.ini.sample
+++ b/custom/conf/app.ini.sample
@@ -74,6 +74,23 @@ WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP]
; List of reasons why a Pull Request or Issue can be locked
LOCK_REASONS=Too heated,Off-topic,Resolved,Spam
+[cors]
+; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers
+; enable cors headers (disabled by default)
+ENABLED=false
+; scheme of allowed requests
+SCHEME=http
+; list of requesting domains that are allowed
+ALLOW_DOMAIN=*
+; allow subdomains of headers listed above to request
+ALLOW_SUBDOMAIN=false
+; list of methods allowed to request
+METHODS=GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
+; max time to cache response
+MAX_AGE=10m
+; allow request with credentials
+ALLOW_CREDENTIALS=false
+
[ui]
; Number of repositories that are displayed on one explore page
EXPLORE_PAGING_NUM = 20