8000 RemoteJsonManifestVersionStrategy is not used when json_manifest_path is filled in by a environment variable · Issue #39264 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
RemoteJsonManifestVersionStrategy is not used when json_manifest_path is filled in by a environment variable #39264
Closed
@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

      0