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

Resource route handling #238

Open
godspeed20 opened this issue May 13, 2019 · 1 comment
Open

Resource route handling #238

godspeed20 opened this issue May 13, 2019 · 1 comment

Comments

@godspeed20
Copy link

another one, we'll take a look at pushing a pr to you for this one. with normal routes, you do a regex matcher on the path, but for resources you do string starts with. that means that you can't use wildcards as there's no regex handling, but also if you have multiple routes at different levels, you might have the wrong ones catch the wrong resource (say /ui/data and /ui routes would both match for a resource at /ui/data, though if you put them in the wrong order you're a numpty anyway). the issue we're seeing is we want the resource route to support the wildcards (as an example, we build our ui via react but package it as a single page js into the server rather than run a node server just for the ui, so we're trying to mirror the wildcard support in react router to pass the server routes through to react)

The line in question if in org.http4k.routing.internal.kt line 26.

obviously there's others matches you use to fallback to index.html so we'll see what comes out, but that's the area we're looking into , not sure if that's something you're already looking at as well though.

thanks!

@daviddenton
Copy link
Member

We hadn't come across that issue - PR would be great.

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

No branches or pull requests

2 participants