Jump to content

sobrenome

Clients
  • Posts

    2,525
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by sobrenome

  1. 2 hours ago, Randy Calvert said:

    You may need to look at your cache policy. Many default rules will treat files with a query string as uncachable.  Since the requested object has a query string, it could be skipping cache and considering the file as dynamic. 

    I have tried with and without que query string. No change. The issue is related to the cookies that are sent with the request, that should not be sent. Even if I set no cookie on cache policy and no cookie on request policy, the cookies are sent. I can’t figure out why. 

  2. 9 hours ago, The Old Man said:

    so I assumed either you were working on it or you just have Cloudfront unavailable from the UK where I am

    Yes! As long as the site written in Portuguese and many robots from UK were intensively consuming the resources, UK was blocked on Cloudfront distribution (China and Russia for the same reason).

     

    9 hours ago, The Old Man said:

    I'm wondering though if it's because your whole site is hosted on S3 and behind Cloudfront and you have a sub domain behind Cloudfront too

    Only CSS, images and JS is hosted on S3 (using the IPS 4 feature). The website pages are on EC2, behind ELB and Cloudfront.

     

    9 hours ago, The Old Man said:

    Have you therefore got 2 Cloudfront origins set up, one for the IPS site and one for the CDN subdomain?

    Yes, 2 origins. One is S3 and the other one is ELB.

     

    8 hours ago, The Old Man said:

    Check the cache-control meta data on the file in S3 console, should look something like:

    S3 files are caching fine. The issue is related to woff2 font (that is not hosted on S3) and web manifest (also not hosted on S3).

  3. 1 hour ago, The Old Man said:

    If you have some individual behaviours say for CSS or Images but don't have one one for fonts Cloudfront falls back to the default caching behaviour so check that in case it's not configured to cache properly.

    CSS, images and JS come from S3 and they hit Cloudfront cache.

    To make sure that I was not messing with custom policies, I have tested the manage cache policy (CachingOptimized) and no origin policy and no headers response. 

    Same issue. The request goes along with cookies and that mess the cache.

  4. To make the information more complete, we can see that the font has a Cloudfront hit for IPS website:

    accept-ranges: bytes
    age: 20403
    content-length: 77160
    date: Tue, 16 Aug 2022 08:39:39 GMT
    etag: "12d68-5e5e6f965f240"
    last-modified: Wed, 10 Aug 2022 18:11:13 GMT
    server: Apache
    set-cookie: AWSALB=d6OLM/lKlq1X47HnfNQVg1FkXxrGusuU+o2LGV90rM4zGRFOoMpfajibPJqVNR+XboSUTzadqFbHRq21GusiocuVGg9ZKDrxKJolQWux//W99zrxDV3qxvgzl4eK; Expires=Sun, 21 Aug 2022 08:29:36 GMT; Path=/
    set-cookie: AWSALBCORS=d6OLM/lKlq1X47HnfNQVg1FkXxrGusuU+o2LGV90rM4zGRFOoMpfajibPJqVNR+XboSUTzadqFbHRq21GusiocuVGg9ZKDrxKJolQWux//W99zrxDV3qxvgzl4eK; Expires=Sun, 21 Aug 2022 08:29:36 GMT; Path=/; SameSite=None
    via: 1.1 8bc02eb70fbe9b20b0505e49467df014.cloudfront.net (CloudFront)
    x-amz-cf-id: FbMiym9-hjnyPqx1kE22ga9N1Nk0EYTZpXAYtnzG8GXZ7DROZYtYeA==
    x-amz-cf-pop: IAD66-C2
    x-cache: Hit from cloudfront
    x-content-type-options: nosniff
    :status: 200

    And do not for mine:

    accept-ranges: bytes
    cache-control: max-age=2592000, public
    content-length: 77160
    content-type: application/font-woff2
    date: Tue, 16 Aug 2022 14:33:40 GMT
    etag: "12d68-5e3c8209e1ce0"
    expires: Thu, 15 Sep 2022 14:33:40 GMT
    last-modified: Thu, 14 Jul 2022 18:32:43 GMT
    server: Apache/2.4.54 (Ubuntu)
    set-cookie: AWSALB=ldcCFgF+iJ0E/9dkC7wI4cjnuEVQbpZIdhNTudEvrd2RNGyXq1KOUVxtocvI6fgV6ZgUUbC34vikqmDhDGNxJuswDudtAo0P8RpZDyi/k2/Njzu5uQUSS0REf8QM; Expires=Tue, 23 Aug 2022 14:33:40 GMT; Path=/
    set-cookie: AWSALBCORS=ldcCFgF+iJ0E/9dkC7wI4cjnuEVQbpZIdhNTudEvrd2RNGyXq1KOUVxtocvI6fgV6ZgUUbC34vikqmDhDGNxJuswDudtAo0P8RpZDyi/k2/Njzu5uQUSS0REf8QM; Expires=Tue, 23 Aug 2022 14:33:40 GMT; Path=/; SameSite=None; Secure
    :status: 200

    On the response, the difference is huge.

    How can I configure Cloudfront to achieve the same request and response?

  5. I can't hit Cloudfront cache for font awesome. I have checked that IPS can serve font awesome from Cloudfront.

    Here is my request (https://www.webpagetest.org/result/220816_BiDcWR_ACG/1/details/#waterfall_view_step1😞

    :authority: fisiculturismo.com.br
    :method: GET
    :path: /applications/core/interface/font/fontawesome-webfont.woff2?v=4.7.0
    :scheme: https
    accept: */*
    accept-encoding: gzip, deflate, br
    accept-language: en-US,en;q=0.9
    cookie: AWSALB=V+qLZCNbjEfbsPzZCvXjy8lR1d7lJw+6Qz1bNnwYg3ri9BdDQEtMndfBsf/Hz6jHSj9ffTMEA4MsyUU2es6+KXvX4j590g0Rnn2XevQuROzwR/vyxmaPt32qn142; AWSALBCORS=V+qLZCNbjEfbsPzZCvXjy8lR1d7lJw+6Qz1bNnwYg3ri9BdDQEtMndfBsf/Hz6jHSj9ffTMEA4MsyUU2es6+KXvX4j590g0Rnn2XevQuROzwR/vyxmaPt32qn142; ips4_IPSSessionFront=fi6hu5jv1pl00tp6jshi3uf2ka
    origin: https://fisiculturismo.com.br
    referer: https://fisiculturismo.com.br/
    sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="104", "Google Chrome";v="104"
    sec-ch-ua-mobile: ?1
    sec-ch-ua-platform: "Android"
    sec-fetch-dest: font
    sec-fetch-mode: cors
    sec-fetch-site: same-origin
    user-agent: Mozilla/5.0 (Linux; Android 8.1.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Mobile Safari/537.36 PTST/220727.131331
    customize waterfall • View all Images • View HTTP/2 Dependency Graph • Filmstrip
    Connection View

    Here is IPS website request (https://www.webpagetest.org/result/220816_BiDcMK_A8Y/2/details/#waterfall_view_step1😞

    :authority: invisioncommunity.com
    :method: GET
    :path: /applications/core/interface/font/fontawesome-webfont.woff2?v=4.7.0
    :scheme: https
    accept: */*
    accept-encoding: gzip, deflate, br
    accept-language: en-US,en;q=0.9
    origin: https://invisioncommunity.com
    referer: https://invisioncommunity.com/forums/
    sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="104", "Google Chrome";v="104"
    sec-ch-ua-mobile: ?1
    sec-ch-ua-platform: "Android"
    sec-fetch-dest: font
    sec-fetch-mode: cors
    sec-fetch-site: same-origin
    user-agent: Mozilla/5.0 (Linux; Android 8.1.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Mobile Safari/537.36 PTST/220727.131331

    My request sends the loud balancer sticky cookies and ips4 session cookie (AWSALB, AWSALBCORS, ips4_IPSSessionFront).

    On Cloudfront I am using an origin request policy with no cookie.

    What am I missing?

  6. 1 hour ago, Marc Stridgen said:

    This was am issue on our hosting that was resolved. Similarly, this is an issue on your hosting that you are having, and I believe is related to an issue on your PHP version. Have you recently changed this? If so, please change it back and see if you have the same problem

    The only thing that I have changed is the database read and write separation.

    New error on logs:

    Error: Property access is not allowed yet (0)
    #0 /var/www/html/applications/core/modules/front/search/search.php(746): IPS\Content\Search\Mysql\_Query->search()
    #1 /var/www/html/applications/core/modules/front/search/search.php(126): IPS\core\modules\front\search\_search->_results()
    #2 /var/www/html/system/Dispatcher/Controller.php(118): IPS\core\modules\front\search\_search->manage()
    #3 /var/www/html/system/Dispatcher/Dispatcher.php(153): IPS\Dispatcher\_Controller->execute()
    #4 /var/www/html/index.php(13): IPS\_Dispatcher->run()
    #5 {main}

     

  7. Same issue on self hosted.

    Error: Property access is not allowed yet (0)
    #0 /var/www/html/applications/core/widgets/stream.php(198): IPS\Content\Search\Mysql\_Query->search()
    #1 /var/www/html/applications/cms/sources/Blocks/Block.php(242): IPS\core\widgets\_stream->render()
    #2 /var/www/html/system/Theme/Theme.php(4620) : eval()'d code(136): IPS\cms\Blocks\_Block::display()
    #3 /var/www/html/applications/cms/sources/Pages/Page.php(1250): IPS\Theme\content_pages_52()
    #4 /var/www/html/applications/cms/sources/Pages/Page.php(2276): IPS\cms\Pages\_Page->getHtmlContent()
    #5 /var/www/html/applications/cms/modules/front/pages/page.php(116): IPS\cms\Pages\_Page->output()
    #6 /var/www/html/applications/cms/modules/front/pages/page.php(43): IPS\cms\modules\front\pages\_page->view()
    #7 /var/www/html/system/Dispatcher/Controller.php(118): IPS\cms\modules\front\pages\_page->manage()
    #8 /var/www/html/applications/cms/modules/front/pages/page.php(33): IPS\Dispatcher\_Controller->execute()
    #9 /var/www/html/system/Dispatcher/Dispatcher.php(153): IPS\cms\modules\front\pages\_page->execute()
    #10 /var/www/html/index.php(13): IPS\_Dispatcher->run()
    #11 {main}

×
×
  • Create New...