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
Cookie not set via plugin when running multiple apps #1449
Comments
I've tested under Dancer2 0.205002 and Perl 5.26.0. I also saw the same thing on Dancer 0.204000. Ditto for the master branch. |
I have it reproducing in a unit test (although I still have to have the plugin in another file, wrapping it in a BEGIN block didn't help). FWIW:
|
Ah! I'm setting the cookie incorrectly. It looks like calling $plugin->dsl->cookie(foo => "bar") uses the app from the DSL object, which is static. However, $plugin->app->cookie(foo => "bar"); uses the app object on the plugin, which is app-specific. This still strikes me as a bug, but at least there is a way to successfully set the cookie. 😃 (EDIT: It should be |
Hello! I ran into a weird case. I mount multiple apps in my PSGI file, but when I wrote a plugin that sets a cookie, it only works under one app and not the other. Here's a test case:
When I start everything via
plackup test.psgi
, I see the following behaviour:The text was updated successfully, but these errors were encountered: