Skip to content
Permalink
Browse files

Allow CORS requests to thumbnails

  • Loading branch information...
FlorianSW committed Jul 27, 2019
1 parent 0c10761 commit 37f5b5f5e256e09cc08daa9ead06c3c72d81c00f
Showing with 6 additions and 0 deletions.
  1. +6 −0 modules/role/manifests/nginx/dstatic.pp
@@ -92,6 +92,12 @@
# https://github.com/jfryman/puppet-nginx/issues/692
raw_prepend => [
'location ~ \.php$ {',
' if ($request_filename ~ "thumb.php$") {',
' add_header Access-Control-Allow-Origin "*";',
' add_header Access-Control-Allow-Methods "GET, OPTIONS";',
' add_header Access-Control-Allow-Headers "User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range";',
' add_header Access-Control-Expose-Headers "Content-Length,Content-Range,X-Cache,X-Varnish,Age,Date";',
' }',
' fastcgi_param HTTP_ACCEPT_ENCODING "";',
' include /etc/nginx/fastcgi_params;',
' fastcgi_pass $mediawikibackend;',

0 comments on commit 37f5b5f

Please sign in to comment.
You can’t perform that action at this time.