https://github.com/mevdschee/asset-proxy.php
A PHP proxy to make your website assets as high available as your site.
https://github.com/mevdschee/asset-proxy.php
Last synced: 10 months ago
JSON representation
A PHP proxy to make your website assets as high available as your site.
- Host: GitHub
- URL: https://github.com/mevdschee/asset-proxy.php
- Owner: mevdschee
- Created: 2014-12-18T00:58:10.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-19T23:23:26.000Z (about 11 years ago)
- Last Synced: 2024-10-05T21:41:52.037Z (over 1 year ago)
- Language: PHP
- Size: 270 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
asset-proxy.php
===============
A PHP proxy to make your website assets as high available as your site. It is aimed at simple replacement of your CDN URL's for your assets with this proxy. This makes sure that your assets have the same availablity as your website and at the same time circumvent same origin restrictions.
Install asset-proxy.php in your webroot. Then replace all references in your HTML from:
href="http://fonts.googleapis.com/css?family=Droid+Sans:400,700"
to:
href="/asset-proxy.php/fonts.googleapis.com/css?family=Droid+Sans:400,700"
Make sure you edit the list of allowed hostnames in the header of the PHP file and that you set an appropriate refresh time (in seconds). If the assets are not available upon refresh the stale files are served.