# \#actiondispatch

**URL:** https://discuss.rubyonrails.org/tag/actiondispatch/33.md

[Latest](https://discuss.rubyonrails.org/latest.md) · [Categories](https://discuss.rubyonrails.org/categories.md) · [Tags](https://discuss.rubyonrails.org/tags.md)

---

## [How to handle 50k+ routes?](https://discuss.rubyonrails.org/t/how-to-handle-50k-routes/90115)

<div class="topic-metadata">

**Author:** [@dorianmariefr](https://discuss.rubyonrails.org/u/dorianmariefr)\
**Replies:** 2\
**Last updated:** [January 29, 2026, 9:01am UTC](https://discuss.rubyonrails.org/t/how-to-handle-50k-routes/90115 "2026-01-29T09:01:34Z")

</div>

hi, i have many nested routes (nested inside nested inside nested…) and they are full resources so that generates many routes, slowing down my boot time and my application in general here is my routes file if anyone wa…

---

## [Rationale behind path and method change in \`ActionDispatch::ShowExceptions\`](https://discuss.rubyonrails.org/t/rationale-behind-path-and-method-change-in-actiondispatch-showexceptions/89961)

<div class="topic-metadata">

**Author:** [@dari-us](https://discuss.rubyonrails.org/u/dari-us)\
**Replies:** 2\
**Last updated:** [November 23, 2025, 9:05pm UTC](https://discuss.rubyonrails.org/t/rationale-behind-path-and-method-change-in-actiondispatch-showexceptions/89961 "2025-11-23T21:05:26Z")

</div>

In ActionDispatch::ShowExceptions#render\_exception there is code to change the request path\_info and request\_method. request.path\_info = "/#{status}" request.request\_method = "GET" Inspecting the response headers, this…

---

## [Adding support for report-to to ActionDispatch::ContentSecurityPolicy](https://discuss.rubyonrails.org/t/adding-support-for-report-to-to-actiondispatch-contentsecuritypolicy/89787)

<div class="topic-metadata">

**Author:** [@joshuacronemeyer](https://discuss.rubyonrails.org/u/joshuacronemeyer)\
**Replies:** 0\
**Last updated:** [September 11, 2025, 6:25pm UTC](https://discuss.rubyonrails.org/t/adding-support-for-report-to-to-actiondispatch-contentsecuritypolicy/89787 "2025-09-11T18:25:51Z")

</div>

Hi there, We have to support the newer report-to CSP directive in order to pass our annual security audits without having to do extra administrative work tracking ‘false positives’. We’re doing that now by monkey patchi…

---

## [Supporting Amazon Load Balancer request ids](https://discuss.rubyonrails.org/t/supporting-amazon-load-balancer-request-ids/89182)

<div class="topic-metadata">

**Author:** [@rjnienaber](https://discuss.rubyonrails.org/u/rjnienaber)\
**Replies:** 0\
**Last updated:** [May 7, 2025, 8:42am UTC](https://discuss.rubyonrails.org/t/supporting-amazon-load-balancer-request-ids/89182 "2025-05-07T08:42:37Z")

</div>

The header in HTTP requests that identifies the request can be configured with config.action\_dispatch.request\_id\_header. When hosting a web application that uses an AWS load balancer, it adds the X-Amzn-Trace-Id header a…

---

## [Can we get session data in log tags?](https://discuss.rubyonrails.org/t/can-we-get-session-data-in-log-tags/86292)

<div class="topic-metadata">

**Author:** [@justLearningRb](https://discuss.rubyonrails.org/u/justLearningRb)\
**Replies:** 0\
**Last updated:** [July 30, 2024, 10:15am UTC](https://discuss.rubyonrails.org/t/can-we-get-session-data-in-log-tags/86292 "2024-07-30T10:15:27Z")

</div>

Hi, I have a rails 7 web app, which uses redis, hiredis, redis-actionpack to store session data. We also use devise for auth. Now, I wish to use log tags to include user\_id in every line the logger logs. Is there a way t…

---

## [Request start log messages should use ActiveSupport::LogSubscriber in Rails::Rack::Logger](https://discuss.rubyonrails.org/t/request-start-log-messages-should-use-activesupport-logsubscriber-in-rails-logger/83247)

<div class="topic-metadata">

**Author:** [@sled](https://discuss.rubyonrails.org/u/sled)\
**Replies:** 0\
**Last updated:** [July 14, 2023, 3:22pm UTC](https://discuss.rubyonrails.org/t/request-start-log-messages-should-use-activesupport-logsubscriber-in-rails-logger/83247 "2023-07-14T15:22:18Z")

</div>

Currently the following log message Started GET "/something" for 127.0.0.1 at 2023-07-14 09:52:04 +0200" is directly logged in Rails::Rack::Logger using Rails.logger.info in railties/lib/rails/rack/logger.rb This pos…

---

## [\[CVE-2023-22795\] Possible ReDoS based DoS vulnerability in Action Dispatch](https://discuss.rubyonrails.org/t/cve-2023-22795-possible-redos-based-dos-vulnerability-in-action-dispatch/82118)

<div class="topic-metadata">

**Author:** [@jhawthorn](https://discuss.rubyonrails.org/u/jhawthorn)\
**Replies:** 0\
**Last updated:** [January 17, 2023, 7:18pm UTC](https://discuss.rubyonrails.org/t/cve-2023-22795-possible-redos-based-dos-vulnerability-in-action-dispatch/82118 "2023-01-17T19:18:42Z")

</div>

Possible ReDoS based DoS vulnerability in Action Dispatch There is a possible regular expression based DoS vulnerability in Action Dispatch related to the If-None-Match header. This vulnerability has been assigned the CV…

---

## [\[CVE-2023-22792\] Possible ReDoS based DoS vulnerability in Action Dispatch](https://discuss.rubyonrails.org/t/cve-2023-22792-possible-redos-based-dos-vulnerability-in-action-dispatch/82115)

<div class="topic-metadata">

**Author:** [@jhawthorn](https://discuss.rubyonrails.org/u/jhawthorn)\
**Replies:** 0\
**Last updated:** [January 17, 2023, 7:16pm UTC](https://discuss.rubyonrails.org/t/cve-2023-22792-possible-redos-based-dos-vulnerability-in-action-dispatch/82115 "2023-01-17T19:16:23Z")

</div>

There is a possible regular expression based DoS vulnerability in Action Dispatch. This vulnerability has been assigned the CVE identifier CVE-2023-22792. Versions Affected: \>= 3.0.0 Not affected: \< 3.0.0 Fixed V…

---

## [\[Proposal\] Routing: allow symbol HTTP statuses in \`redirect\_to\`](https://discuss.rubyonrails.org/t/proposal-routing-allow-symbol-http-statuses-in-redirect-to/81951)

<div class="topic-metadata">

**Author:** [@jas14](https://discuss.rubyonrails.org/u/jas14)\
**Replies:** 1\
**Last updated:** [December 14, 2022, 12:48am UTC](https://discuss.rubyonrails.org/t/proposal-routing-allow-symbol-http-statuses-in-redirect-to/81951 "2022-12-14T00:48:19Z")

</div>

Summary I propose augmenting ActionDispatch::Routing::Redirection#redirect so it can accept a symbolic status: get '/everyone', to: redirect('/users', status: :found) in addition to the current numeric HTTP status: ge…

---

## [Request for PR feedback](https://discuss.rubyonrails.org/t/request-for-pr-feedback/81392)

<div class="topic-metadata">

**Author:** [@sarahmaas](https://discuss.rubyonrails.org/u/sarahmaas)\
**Replies:** 1\
**Last updated:** [September 9, 2022, 8:06pm UTC](https://discuss.rubyonrails.org/t/request-for-pr-feedback/81392 "2022-09-09T20:06:48Z")

</div>

Not mine, but would like to bump this old PR for feedback as it would resolve an issue we recently ran into :slight\_smile:

---

## [Where to run cookie rotator when upgrading to Rails 7?](https://discuss.rubyonrails.org/t/where-to-run-cookie-rotator-when-upgrading-to-rails-7/80236)

<div class="topic-metadata">

**Author:** [@sdubois](https://discuss.rubyonrails.org/u/sdubois)\
**Replies:** 0\
**Last updated:** [March 11, 2022, 3:53pm UTC](https://discuss.rubyonrails.org/t/where-to-run-cookie-rotator-when-upgrading-to-rails-7/80236 "2022-03-11T15:53:58Z")

</div>

The Rails 7 new\_framework\_defaults\_7\_0.rb file instructs to add some code for registering a cookie rotator (below). Should this code be executed a single time e.g. in a one-off rake task, or executed in an initializer at…
