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

add meta for forcing trailing slash #3201

Open
AceCodePt opened this issue Feb 19, 2025 · 1 comment
Open

add meta for forcing trailing slash #3201

AceCodePt opened this issue Feb 19, 2025 · 1 comment

Comments

@AceCodePt
Copy link

Can we have a meta config that would enforce trailing slash for all requests?

@Telroshan
Copy link
Collaborator

I'm not sure adding a global configuration property would be that relevant for the core library, though you can already do the following:

  • bind a htmx:configRequest listener to your document.body and enforce the trailing slash (the event exposes event.detail.path which is the path the request will be made against)
  • or, even make a (community) extension to enforce that (if you want to make it available to other htmx developers that might have the same need)

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants