diff options
author | lain <lain@soykaf.club> | 2018-04-02 13:15:38 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-04-02 13:15:38 +0200 |
commit | cd543d58a1b8ddf0f41a39800dc7a18321cd3250 (patch) | |
tree | 3bafc7d6c40258d1dc56c7539c8e11c25e9f1e22 /installation | |
parent | 0a14d155d6a55366449bc8dea638e24200bb3dd0 (diff) | |
parent | 7130e9ddb16286efd7d01088e816f05e82cfa2a1 (diff) | |
download | pleroma-cd543d58a1b8ddf0f41a39800dc7a18321cd3250.tar.gz pleroma-cd543d58a1b8ddf0f41a39800dc7a18321cd3250.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into develop
Diffstat (limited to 'installation')
-rw-r--r-- | installation/pleroma.nginx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index 25f6dadff..11dc6456c 100644 --- a/installation/pleroma.nginx +++ b/installation/pleroma.nginx @@ -28,7 +28,16 @@ server { gzip_http_version 1.1; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/activity+json application/atom+xml; location / { - add_header 'Access-Control-Allow-Origin' '*'; + # if you do not want remote frontends to be able to access your Pleroma backend + # server, remove these lines. + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'POST, GET, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type' always; + if ($request_method = OPTIONS) { + return 204; + } + # stop removing lines here. + proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; |