-
Notifications
You must be signed in to change notification settings - Fork 142
Option to allow URLs that contain a dot (.) to be rewritten #25
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
Comments
Seems to be kind of a duplicate of #17. I'm leaving this open for now to document that more than one person actually has a need for this feature, but feel free to close if you think it's too esoteric. I'll resort to hacking my own middleware for now. |
@fixpunkt: This topic has come up multiple times now. So I'd inclined to solve it with this middleware. Would #22 solve your use case with a few changes? I am thinking about merging #22 and changing the contents of the If this solves your use case, I'll merge and release this asap. |
Unfortunately, #22 only fixes part of the problem. I would also need a config option
#22 is required to alleviate the fallout of this: If I disable the "don't rewrite paths that contain dots" rule, I have no way to continue serving my static assets, so I'll have to add |
That sounds pretty complicated @fixpunkt. Is there no way for you to make use of the rewrites rule? https://github.com/bripkens/connect-history-api-fallback#rewrites |
Yeah, maybe something like I've ended up building a 3-line koa middleware that does this to solve my problem yesterday, so yeah, I guess we can close this issue. Thanks for your help! |
What is the best way of dealing with this? It's a really annoying behavior, some of my URLS include a dot because it's a valid URL character. I'd like to understand better why |
@domenkozar: Since this has been request a bunch of times now, I added an option to disable the https://github.com/bripkens/connect-history-api-fallback#disabledotrule The feature has been released as version |
@bripkens thanks! I wonder why dotrule is even needed? Shouldn't filesystem be accessed first and then fallback would go to history api? |
In a perfect world, yes. Unfortunately, there are very many ways where this gets complicated:
On top of all this, the dot rule has been part of this middleware since day 1 (worked perfect for my use case at that time) and I don't want to change the middleware's default settings (and by that upset other users for which this also works fine). |
Closing since this is implemented now. |
Hi there,
I've got a use case that is a little different:
My view URLs may actually contain dots as part of the URL (because I pass quoted URLs as a path parameter). For this to work I'd need the following:
Would you be willing to consider this use case?
Cheers,
Jannik
The text was updated successfully, but these errors were encountered: