After reading How GitHub became the web’s largest font piracy site (and how to fix it) I was wondering how I can avoid uploading/publishing font files on GitHub, considering that most of my sites are deployed by Netlify, and require all files to be inside the repository.
At first I tried to encrypt the fonts using a 7z archive. Unfortunately, 7zip can not be used inside Netlify deploys, so I decided to try and download an archive from a secret, remote location before building the project:
"scripts": {
"build": "npm run fonts:fetch && gatsby build",
"fonts:fetch": "wget -O Fonts.zip $SECRET_FONTS_URL; unzip Fonts.zip -d ./static/fonts; rm Fonts.zip",
}
I run an NPM Script called fonts:fetch
, which will download a zip file from a secret location specified inside an environment variable. This zip file can then be extracted to a desired location and Netlify can use it inside the building process.
Inside my deploy settings, I can then set that secret URL:
... which ensures that no trace of the font files is left inside the repository! 👮♂️
Top comments (5)
How to stop digital piracy & redistribution
offering a good product and a good user experience at a fair price.
Education & public relations
Piracy is a crime and it is illegal. Redistribution can lead to legal challenges and exposure to cybersecurity flaws. Like exposure to malicious materials.
Tech Ops
Identifying your pirated content is important in reducing piracy and illegal redistribution.
You need to know the technical know how so you can intervene.
Continuous monitoring will keep the pirates out.
With the correct anti-piracy services, operators can identify consumers who are pirating and redistrubing your product
While you can never fully stop piracy, you can reduce the effect of losing revenue by implementing these processes.
Priveguard.com proactively detects and protects your creative works from piracy, so you can earn more & focus on creating incredible assets!
How it works
Get started in just two simple steps:
Sign up and add your assets
Every week, PriveGuard scans and removes illegal copies of your assets online
Enjoy the peace of mind that your creative works are protected! You can cancel anytime 🙂
We can fix this. But should we?
Nice solution! A bit complicated tho'. Would be nice to have an automated solution for this.
Yes, we will be automating the process once we get the word out there. Thank you.
This is great. Well done.