Skip to content

Instantly share code, notes, and snippets.

@mariocesar
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariocesar/1b9142bf9c22d6f1e480 to your computer and use it in GitHub Desktop.
Save mariocesar/1b9142bf9c22d6f1e480 to your computer and use it in GitHub Desktop.
Mock a REST Api authorization token. Just for testing
# Solo permite acceder a quienes dan el token correcto
SetEnvIf Authorization "^Token QprcGo242MmjsB1ZoCwAq5EYs5e9Mjsnj1gug3YBxAIIE6of$" HTTP_SAFE_USE=1
Order Deny,Allow
Deny from All
Allow from env=HTTP_SAFE_USE
# No permite que ninguna respuesta sea cacheada
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
# Reescribe las urls
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L,QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment