Skip to content

4.89.3 - Fix setting public folder for `FileMiddleware` when using bundles

Compare
Choose a tag to compare
@penny-for-vapor penny-for-vapor released this 14 Dec 02:56
· 40 commits to main since this release
67fe736

What's Changed

Fix setting public folder for FileMiddleware when using bundles by @grantjbutler in #3113

This PR fixes an issue where, if you provided a subfolder within a bundle’s resources, the wrong path would be provided to the FileMiddleware, causing the resources to not be loaded.

For example, given a bundle with the following structure:

App.app/
└── Contents/
    β”œβ”€β”€ MacOS/
    β”‚   └── App
    └── Resources/
        └── web-app/
            └── Public
                └── index.html

If you tried to create an instance of FileMiddleware that tried to use web-app/Public/ as the folder to serve files from, FileMiddleware would incorrectly use the resource path of the bundle (App.app/Resources/) instead of the full path to the specified folder (App.app/Resources/web-app/Public/).

New Contributor

This patch was released by @gwynne

Full Changelog: 4.89.2...4.89.3