in reply to Plack middleware sets Plack env value but it's not consumable in the same builder
I was able to get the results I needed with the following code using an in-line middleware:
builder { #enable 'RequestId', id_generator => sub { # Data::GUID->new->as_string; #}; enable sub { my $app = shift; sub { my $env = shift; $env->{'psgix.request_id'} = Data::GUID->new->as_string; my $res = $app->($env); # do postprocessing return $res; }; }; ...
Thanks for looking!
|
|---|