Search code examples
cachingcdnamp-html

How can I whitelist a font provider for Google AMP pages?


The AMP documentation states:

Font providers can be whitelisted if they support CSS-only integrations and serve over HTTPS. The following origins are currently allowed for font serving via link tags:

https://fast.fonts.net
https://fonts.googleapis.com

IMPLEMENTERS NOTE: Adding to this list requires a change to the Google AMP Cache CSP rule.

So how can I add typography.com hosted fonts to the "AMP Cache CSP rule" as indicated by the "IMPLEMENTER'S NOTE?"


Solution

  • fast.fonts.net was whitelisted in an issue on the @ampproject/amphtml GitHub project. I would assume additional font providers would follow the same process. Be sure to read the contributing guide before opening any issues.