Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@astrojs/image] Handle missing trailing slash in processStaticImage #6421

Merged
merged 1 commit into from
Mar 7, 2023
Merged

[@astrojs/image] Handle missing trailing slash in processStaticImage #6421

merged 1 commit into from
Mar 7, 2023

Commits on Mar 4, 2023

  1. [@astrojs/image] Handle missing trailing slash in processStaticImage

    The code path changed by this commit isn't only taken when running using Vite. If the site is configured with a base url which is different from `/` but does **not** end with `/` (for example, because `trailingSlash` is set to `never`), the `- 1` results in an off-by-one error when truncating the URL.
    
    By checking if the base url ends with `/`, we can determine the right length for the prefix to truncate.
    vtavernier authored and alixinne committed Mar 4, 2023
    Configuration menu
    Copy the full SHA
    67a8800 View commit details
    Browse the repository at this point in the history