... | @@ -58,19 +58,23 @@ Save as `cors.xml` and run |
... | @@ -58,19 +58,23 @@ Save as `cors.xml` and run |
|
gsutil cors set cors.xml gs://fonts.acmecompany.com/
|
|
gsutil cors set cors.xml gs://fonts.acmecompany.com/
|
|
|
|
|
|
|
|
|
|
### set headers
|
|
### mime-type headers
|
|
|
|
|
|
Notes:
|
|
Notes:
|
|
|
|
|
|
* https://developers.google.com/storage/docs/gsutil/commands/setmeta
|
|
* https://developers.google.com/storage/docs/gsutil/commands/setmeta
|
|
* keep the `**` to match files in subdirectories https://developers.google.com/storage/docs/gsutil/addlhelp/WildcardNames
|
|
* the `**` wildcard includes subdirectories, https://developers.google.com/storage/docs/gsutil/addlhelp/WildcardNames
|
|
* EOT and SVG `content-type` headers are detected correctly during upload.
|
|
* EOT and SVG `content-type` headers are detected correctly during upload.
|
|
* WOFF is set to the old mime type `x-font/woff`; that works but we decided to go with the future-proof
|
|
* WOFF is set to the old mime type `x-font/woff`; that works but we decided to go with the future-proof
|
|
* file bug report at Google?
|
|
* file bug report at Google?
|
|
* For example otf:
|
|
* For otf:
|
|
gsutil setmeta -r -h "Content-Type:font/opentype" -h "Cache-Control:public, max-age=3600" -h "Content-Disposition" gs://mathjax-cdn/mathjax/2.3-latest/fonts/HTML-CSS/**.otf
|
|
gsutil setmeta -r -h "Content-Type:font/opentype" -h "Cache-Control:public, max-age=3600" -h "Content-Disposition" gs://mathjax-cdn/mathjax/2.3-latest/fonts/HTML-CSS/**.otf
|
|
|
|
* For otf:
|
|
|
|
gsutil setmeta -r -h "Content-Type:application/font-woff" -h "Cache-Control:public, max-age=3600" -h "Content-Disposition" gs://mathjax-cdn/mathjax/2.3-latest/fonts/HTML-CSS/**.woff
|
|
|
|
|
|
|
|
|
|
## TODO
|
|
## TODO
|
|
|
|
|
|
* test scripts to check setup |
|
* tests -- we don't actually have any tests that check the functionality of the CDN.
|
|
\ No newline at end of file |
|
* CORS
|
|
|
|
* mimetype |
|
|
|
\ No newline at end of file |