Magento PWA Venia giving incorrect Cache-Control Headers

I am using Magento 2.4.3-p3 with PWA Venia on storefront and recently have observed incorrect headers i.e. it’s always no-cache, no-store & max-age=60.

I have checked the backend code and do not see any cacheable=false code in custom modules. I think it’s due to the upward.yml configuration (given below).

# This is a top-level object used to set values for the root `status`,
# `headers`, and `body` properties.
# It is the first branch in an abstract decision tree, which ultimately
# resolves to an object that contains values for its own 'status', 'headers',
# and 'body' properties.
# This object uses a ConditionalResolver to determine the object value based
# on the URL pattern in the request object.
veniaResponse:
    resolver: conditional
    when:
        # Requests to graphql/rest endpoints, the media library, and cache are
        # handled by the top-level 'veniaProxy' object, which is a ProxyResolver
        # that passes the request through to the backing Magento server.
        - matches: request.url.pathname
          pattern: '^/(graphql|rest|media)(/|$)'
          use: veniaProxy
        - matches: request.url.pathname
          pattern: '^/(robots.txt|favicon.ico|manifest.json)'
          use: staticFromRoot
        - matches: fileExtension
          pattern: '(js|json|png|jpg|gif|svg|ico|css|txt)'
          use: veniaStatic
    default: veniaAppShell

# A FileResolver for serving certain files directly from document root,
# even though they are published to the `static` folder in build assets.
staticFromRoot:
    inline:
        status: 200
        headers:
            resolver: inline
            inline:
                content-type: contentTypeFromExtension
                cache-control:
                    inline: public, max-age=604800
        body:
            resolver: file
            parse:
              inline: text
            encoding:
              inline: binary
            file:
                resolver: template
                engine: mustache
                provide:
                    filename: request.url.pathname
                template:
                    resolver: inline
                    inline: './venia-static/{{ filename }}'

contentTypeFromExtension:
    when:
        - matches: fileExtension
          pattern: '^ico$'
          use:
              inline: image/x-icon
        - matches: fileExtension
          pattern: '^txt$'
          use:
              inline: text/plain
        - matches: fileExtension
          pattern: '^json$'
          use:
              inline: application/json
    default:
        inline: text/html

# Contains the file extension--the part after the dot--of the URL path.
fileExtension:
    resolver: conditional
    when:
        - matches: request.url.pathname
          pattern: '.(.*)$'
          use: $match.$1
    default:
        inline: ''

# A ProxyResolver object that passes a request to the backend Magento
# server defined in the MAGENTO_BACKEND_URL environment variable.
# An UPWARD server infers this object as a ProxyResolver due to the presence
# of the 'target' property.
veniaProxy:
    resolver: proxy
    target: env.MAGENTO_BACKEND_URL
    # A local Magento install may have SSH configured and untrusted,
    # which is not a major concern for this one origin, especially if
    # containerized. Clients which require trust may proxy through UPWARD.
    ignoreSSLErrors:
      when:
          - matches: env.NODE_ENV
            pattern: 'production'
            use:
              inline: false
      default:
        inline: true

# Page type data for initial render
veniaPageType:
  resolver: inline
  inline:
    data:
      resolver: computed
      type:
        resolver: inline
        inline: pageType
      additional:
        - type: product
          fetch: '__typename,id'
        - type: cms_page
          fetch: 'identifier'
        - type: category
          fetch: 'uid'

# Nonce for page type inline script
veniaPageTypeNonce:
  resolver: inline
  inline:
    nonce:
      resolver: computed
      type:
        resolver: inline
        inline: pageTypeNonce

# Webpack chunks to preload on page based on page type
veniaWebpackChunks:
  resolver: inline
  inline:
    scripts:
      resolver: computed
      type:
        resolver: inline
        inline: webpackChunks

# The veniaAppShell object resolves to a response that returns server-side
# rendered HTML containing the PWA application shell.
# For SEO purposes, the appropriate meta tags in the HTML head element are also
# set based on information about the resource.
# This object uses properties in the top-level 'veniaResponse' object to return
# the appropriate response values.
veniaAppShell:
    resolver: inline
    inline:
        status:
            resolver: inline
            inline: 200
        headers:
            resolver: inline
            inline:
                content-type:
                    inline: text/html
                cache-control:
                    inline: s-maxage=60
        body:
          resolver: template
          engine: mustache
          provide:
            pageType: veniaPageType.data
            pageTypeNonce: veniaPageTypeNonce.nonce
            webpackChunks: veniaWebpackChunks.scripts
          template:
            resolver: file
            file:
              resolver: inline
              inline: './index.html'


# The veniaStatic object is a DirectoryResolver that allows access to the files
# inside the project's compiled './dist' directory.
veniaStatic:
    resolver: directory
    directory:
        resolver: inline
        inline: '.'

# These are no-ops at runtime; nothing refers to these context values in the
# rest of this file. They exist to declare that the files in the `./static`
# directory are required and should be copied into the build assets by the
# UpwardIncludePlugin. Since they are not directly mentioned elsewhere in this
# file or any other upward.yml file in the build, the UpwardIncludePlugin would
# fail to copy them if they were not mentioned here.

# The static directory includes files which don't need to be compiled.
# They are served by the `veniaStatic` DirectoryResolver, along with the
# bundles and other assets, but since that resolver serves the `.` dist
# directory, the UpwardIncludePlugin will not copy it to avoid circular
# dependency. TODO: This is kind of confusing.
veniaStaticIncludes:
    resolver: directory
    directory:
        resolver: inline
        inline: './venia-static'
status: veniaResponse.status
headers: veniaResponse.headers
body: veniaResponse.body

Upon further debugging, I observed that it always uses default veniaAppShell, which is fine as the content shouldn’t be cached for bots. But what about actual users? But shouldn’t it use staticFromRoot?

Need help here, how do I fix the headers? Because due to this Varnish isn’t caching.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật