Created
May 23, 2013 19:20
-
-
Save Schepp/5638708 to your computer and use it in GitHub Desktop.
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
# This .htaccess needs Apache with: | |
# mod_rewrite | |
# mod_headers | |
# mod_proxy | |
# SSL certificate | |
# Proxies "https://api.twitter.com.cors-proxy.io/1.1/statuses/mentions_timeline.json?count=2&since_id=14927799" | |
# To: "https://api.twitter.com/1.1/statuses/mentions_timeline.json?count=2&since_id=14927799" | |
# All while setting CORS header on the fly | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin: "*" | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteCond %{SERVER_PORT} ^80 | |
RewriteCond %{HTTP_HOST} ^(.+)\.cors-proxy\.io$ | |
RewriteRule ^(.*)$ http://%1/$1 [P,QSA,L] | |
RewriteCond %{SERVER_PORT} ^443 | |
RewriteCond %{HTTP_HOST} ^(.+)\.cors-proxy\.io$ | |
RewriteRule ^(.*)$ https://%1/$1 [P,QSA,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment