Last active
August 29, 2015 14:02
-
-
Save mariocesar/1b9142bf9c22d6f1e480 to your computer and use it in GitHub Desktop.
Mock a REST Api authorization token. Just for testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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