2015-12-13 04:42:28 +00:00
|
|
|
<IfModule mod_headers.c>
|
2016-01-03 08:06:55 +00:00
|
|
|
Header always set Access-Control-Allow-Origin "*"
|
|
|
|
Header always set Access-Control-Allow-Methods "POST, GET, PUT, OPTIONS, PATCH, DELETE"
|
|
|
|
Header always set Access-Control-Allow-Headers "Authorization,X-Accept-Charset,X-Accept,Content-Type"
|
2015-12-13 04:42:28 +00:00
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
<IfModule mod_negotiation.c>
|
|
|
|
Options -MultiViews
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
RewriteEngine On
|
|
|
|
RewriteBase /
|
|
|
|
|
|
|
|
# Deny access to framework directories
|
2016-02-18 12:51:58 +00:00
|
|
|
RewriteRule ^(app|bootstrap|config|database|resources|storage|tests|vendor|node_modules)/ - [R=404,L,NC]
|
2016-02-17 15:36:40 +00:00
|
|
|
|
2015-12-13 04:42:28 +00:00
|
|
|
# And dot files/folders (for example .env)
|
|
|
|
RedirectMatch 404 /\..*$
|
|
|
|
|
|
|
|
# Redirect Trailing Slashes...
|
|
|
|
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
|
|
|
|
|
|
|
# Handle Front Controller...
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteRule ^ index.php [L]
|
2015-12-29 01:35:22 +00:00
|
|
|
|
|
|
|
# https://github.com/tymondesigns/jwt-auth/wiki/Authentication
|
|
|
|
RewriteCond %{HTTP:Authorization} ^(.*)
|
|
|
|
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
|
2015-12-13 04:42:28 +00:00
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
<IfModule mod_deflate.c>
|
|
|
|
# Disable deflation for media files.
|
|
|
|
SetEnvIfNoCase Request_URI "^/api/play/" no-gzip dont-vary
|
|
|
|
</IfModule>
|
2016-01-14 03:28:58 +00:00
|
|
|
|
|
|
|
<IfModule mod_expires.c>
|
|
|
|
# Cache the audio files for 1 year.
|
|
|
|
# It's up to the browser to respect this.
|
|
|
|
ExpiresActive On
|
|
|
|
ExpiresByType audio/(mpe?g3?|ogg|aac) "access plus 1 year"
|
|
|
|
</IfModule>
|