Skip to content

RemoteJsonManifestVersionStrategy is not used when json_manifest_path is filled in by a environment variable #39264

@sverraest

Description

@sverraest

Symfony version(s) affected: 5.1.8

Description
When using an environment variable (e.g. %env(CDN_MANIFEST_PATH)%) the asset library does not detect this is a remote absolute URL and returns an error saying "Asset manifest file htts://yourcdnlink.com/manifest.json" does not exist. So Symfony is aware of the variable (as it renders the full real path) but yet it says it doesn't exist.

How to reproduce

  • Use Symfony 5.1.8
  • Specify json_manifest_path to be an environment variable and check that it exists
  • Configure your assets: section under framework.yml
    assets:
      base_urls:
        - '%env(CDN_DOMAIN)%'
      json_manifest_path: '%env(CDN_MANIFEST_PATH)%' // resolves to https://static.ourdomain.com/manifest.json

If I replace the configuration with hardcoded domains:

    assets:
      base_urls:
        - '%env(CDN_DOMAIN)%'
      json_manifest_path: 'https://static.ourdomain.com/manifest.json'

It works correctly

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy