github / github/secure_headers

"Configuration already exists" error

未關閉
#545 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Ruby
星號
3.2k
分支
253
平均合併
19 小時 11 分鐘
30 天內合併 PR
1

描述

I have a dockerized rails application and every time i change from a branch into another, I receive:
```
2025-02-05 10:43:33.634438 F [48:puma srv tp 001 reporting.rb:38] [[]] Rails -- Exception: SecureHeaders::Configuration::AlreadyConfiguredError: Configuration already exists
app.1 | /opt/bundle/ruby/2.7.0/gems/secure_headers-6.5.0/lib/secure_headers/configuration.rb:47:in `override'
10:43:33 app.1 | /app/app/controllers/application_controller.rb:47:in `'
```
To fix it I have to restart the docker container which is awkward.

貢獻指南

開啟貢獻指南

研究方向

Start with secure_headers-6.5.0/lib/secure_headers/configuration.rb at line 47 and the configuration call in app/controllers/application_controller.rb at line 47. Reproduce the branch switch in the dockerized Rails application and trace why the configuration is treated as already present; done means switching branches no longer requires restarting the container.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
docker, rails, ruby
領域
backend, devops, security
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。