PHP script to proxy and cache google fonts locally on your server. Easily add index.php?url= in front of all google font calls and this it!
git clone https://github.com/gruessung/php-gfont-proxy.git
cd php-gfont-proxy
open docker-compose.yml and change BASE_URL to your own!
docker-compose up
https://fonts.your-domain.com/index.php?url=https://fonts.googleapis.com/css?family=Lato:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&ver=5.6
Sometimes you need an additional .htacess entry
Header set Access-Control-Allow-Origin "*"
MIT