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

Fix for Static Route ordering, and redirecting to Default file option #1246

Merged
merged 2 commits into from
Feb 25, 2024

Conversation

Badgerati
Copy link
Owner

Description of the Change

Fix for the ordering of Static Routes, where a / static route would override any other static route created, like /download.

For example, currently the route ordering will put / before /download, where as now it will be:

  • /download
  • /

Or as a more complex example for for routes like /any/*/files and /any/stuff/files. Before the * route would come first, but now it will be:

  • /any/stuff/files
  • /any/*/files

Also added is a new -RedirectToDefault switch on Add-PodeStaticRoute and Add-PodeStaticRouteGroup. If supplied, then instead of loading the content of an index.html on the folder of a static route, it will instead redirect directly to /index.html on the URL.

Related Issue

Resolves #1228

@Badgerati Badgerati added this to the 2.10.0 milestone Feb 25, 2024
@Badgerati Badgerati self-assigned this Feb 25, 2024
@Badgerati Badgerati merged commit df86e0f into develop Feb 25, 2024
8 checks passed
@Badgerati Badgerati deleted the Issue-1228 branch February 25, 2024 14:26
@Badgerati Badgerati mentioned this pull request Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static Route doesn't resolve correctly link that start with ./
1 participant