matching URL-as-parameter with catch-all placeholder #1722
Unanswered
guillomovitch
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
I would not recommend relying on slashes as data within the URL. A query parameter is a reasonable way to receive such a parameter. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Are you using Apache by any chance? You need to set This test app works fine, when run on its own, via use Mojolicious::Lite;
get '/view/*id' => sub { my $c = shift; $c->render(text => 'I ♥ Mojolicious! ID: ' . $c->param("id")) };
app->start; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I'm not sure this is the correct place for such kind of questions, just tell me if I should use another media.
I'm trying to allow matching business objects (SAML entities, actually) through business identifier (URN or URI), in addition to application-specific internal ID. So, my route dispatching looks like:
Using an URN (/entities/view/urn:foo:bar:tld) as identifier work OK, but using an URI (https://foo.bar.tld) doesn't:
Is there a technical solution ? And does it make sense to coerce this kind of value into a path parameter, instead of a query parameter ?
Regards.
Guillaume
Beta Was this translation helpful? Give feedback.
All reactions