Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@sverraest

Description

@sverraest
Issue body actions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.