-
Notifications
You must be signed in to change notification settings - Fork 203
Open
Description
Hi. According to https://metacpan.org/pod/Dancer::Introduction#CONDITIONAL-MATCHING , "Routes may include some matching conditions (on the useragent and the hostname at the moment)". but I did not get this to work:
get '/hello', {host => 'example.com'} => sub {
return "Hello world\n";
};
The error I got was this one:
Line 166 in 0a5b89c
| raise core_route => "Not a valid option for route matching: `$opt'" |
and the list of valid options seems to be taken from these lists:
Lines 20 to 36 in 0a5b89c
| my @http_env_keys = ( | |
| 'user_agent', 'accept_language', 'accept_charset', | |
| 'accept_encoding', 'keep_alive', 'connection', 'accept', | |
| 'accept_type', 'referer', #'host', managed manually | |
| ); | |
| my $count = 0; | |
| __PACKAGE__->attributes( | |
| # query | |
| 'env', 'path', 'method', | |
| 'content_type', 'content_length', | |
| 'id', | |
| 'uploads', 'headers', 'path_info', | |
| 'ajax', 'is_forward', | |
| @http_env_keys, | |
| ); |
where 'host' has been commented out. Does this mean conditional matching on hostname is no longer supported? Is there an easy way to bring back support for it? Unfortunately, I'm a bit of a novice when it comes to Perl.
Metadata
Metadata
Assignees
Labels
No labels