Skip to content

Handlebar value injection refactor necessary to prevent unstyled content and missing images on missing env var #38

@hotspoons

Description

@hotspoons

This and this - the leading slash in the template causes this to occur when RENDER_PATH_PREFIX is undefined and the context root of the application is not / (e.g. this container is deployed to a path behind a LB on a route):

image

I suggest adding the slash at the end of the injected env var here:

'/' + process.env.RENDER_PATH_PREFIX.replace(/^[\\/]+/, '').replace(/[\\/]+$/, '') :
- a trailing slash, even if redundant should not affect route resolution, so it would be a safer default IMO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions