You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2020/06/12 06:45:38 UTC

[GitHub] [incubator-pagespeed-ngx] ufgeorge opened a new issue #1693: Inline Google Font CSS, but failed in debug

ufgeorge opened a new issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693


   In debug I saw:
   <!--Flattening failed: Cannot import https://fonts.googleapis.com/css?family=Merriweather:300,300i as it is on an unauthorized domain-->
   
   Anything I missed?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] ufgeorge commented on issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
ufgeorge commented on issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693#issuecomment-670516012


   > Please do not use `pagespeed Domain` for domains that are not running PageSpeed. That will result in 404s.
   
   Understand! TKX.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693#issuecomment-669843647


   The only way to check is to take a look at the html code and you can see the css contained in the 'https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all' and noot the <link..... stuff.
   
   Maybe you need to set some like
   
   `pagespeed Domain https://fonts.googleapis.com;`
   or
   `pagespeed InlineResourcesWithoutExplicitAuthorization Script,Stylesheet;`
   
   in your pagespeed config file
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] jmarantz commented on issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
jmarantz commented on issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693#issuecomment-670513358


   Please do not use `pagespeed Domain` for domains that are not running PageSpeed. That will result in 404s.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693#issuecomment-643220553


   From the [doc](https://www.modpagespeed.com/doc/filter-css-inline-import) for inline_import_to_link :
   "..The "Inline @import to Link" filter converts a <style> tag consisting of **only** @import statements into the corresponding `<link>` tags". See the word "only".
   The inline_google_font_css, I think, only works with link label, not with @import.
   The result is that the google font css is not inlined.
   
   About the message, maybe is not rigth. When I have used google fonts, and the inline_google_font_css I get the message of unauthorized domain all time, but the css got inlined.
   Try to put the google font in their own link statement:
   `<link href="https://fonts.googleapis.com/css?family=Merriweather:300,300i" rel="stylesheet">`
   and make sure the `pagespeed GoogleFontCssInlineMaxBytes bytes;` is set to contain all the css for the google fonts


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] jmarantz commented on issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
jmarantz commented on issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693#issuecomment-670514487


   FYI the handling of inlining of google fonts CSS was a special case, it's possible that (a) it's working and the debug message you saw is a red herring or (b) something has changed about google fonts and the pagespeed support for it has not kept up with it. In the latter case there's not a good workaround other than fixing https://github.com/apache/incubator-pagespeed-mod/blob/master/net/instaweb/rewriter/google_font_css_inline_filter.cc
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693#issuecomment-670416976


   Tagmanager and google user content does not have relation with google fonts.
   ```
   pagespeed Domain *.googleusercontent.com;
   pagespeed Domain www.googletagmanager.com;
   
   ```
   If you set these directives you are ok to get 404 resources.
   Example:
   Think a url like https://something.googleuserconten.com/image.jpg
   The domain something.googleuserconten.com is NOT running pagespeed module.
   you get the url rewrited like https://something.googleuserconten.com/ximage.jpg.ic.pagespeed.SOMEHASHHERE.webp
   What do you thing the domain something.googleuserconten.com return when you request the rewrited url?
   So the directive `pagespeed Domain`  must be used for domains you know are running pagespeed module. The only exception is fonts.googleapis.com.
   
   In other hand, this directive make distintion between http and https:
   `pagespeed Domain yourdomain.com;` is not he same as
   `pagespeed Domain https://youdomain.com;` so you can use some like:
   `pagespeed Domain http*://*.youdomain.com;`  this cover http/https versions of all you subdomains.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] ufgeorge commented on issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
ufgeorge commented on issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693#issuecomment-670352748


   Already config both
   pagespeed Domain *.googleusercontent.com;
   pagespeed Domain www.googletagmanager.com;
   and
   pagespeed InlineResourcesWithoutExplicitAuthorization Script,Stylesheet;
   
   I still always get message like:
   No permission to rewrite 'https://lh3.googleusercontent.com/a-/AOh14GhnwsMuBGlt2ikWXkXUO3MCHdzeXkXsvLRYXFiJpw=s96-c?x-oss-process=image/quality,q_100/format,webp/resize,m_mfit,limit_1,h_50'
   No permission to rewrite 'https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXX-1'


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] ufgeorge commented on issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
ufgeorge commented on issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693#issuecomment-669828931


   > 
   > About the message, maybe is not rigth. When I have used google fonts, and the inline_google_font_css I get the message of unauthorized domain all time, but the css got inlined.
   > Try to put the google font in their own link statement:
   > `<link href="https://fonts.googleapis.com/css?family=Merriweather:300,300i" rel="stylesheet">`
   > and make sure the `pagespeed GoogleFontCssInlineMaxBytes bytes;` is set to contain all the css for the google fonts
   
   I did you suggest, I still see "No permission to rewrite 'https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all'"
   
   How do I know it is inlined?
   
   TKX very much.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] ufgeorge closed issue #1693: Inline Google Font CSS, but failed in debug

Posted by GitBox <gi...@apache.org>.
ufgeorge closed issue #1693:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1693


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org