An open API service indexing awesome lists of open source software.

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.

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.