Skip to content
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

[review] メンテナンス画面判定にもrequest.remote_ipを利用するように #30

Merged
merged 4 commits into from
Nov 8, 2023

Conversation

aki77
Copy link
Contributor

@aki77 aki77 commented Nov 7, 2023

No description provided.

@@ -1,13 +1,15 @@
module SgFargateRails
class Config
attr_reader :proxy_ip_addresses
attr_accessor :middleware_enabled_rails_envs
Copy link
Contributor Author

@aki77 aki77 Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

決め打ちは何かと不便なので、デフォルトの挙動は基本そのままで設定可能としたけど、envを設定するのではなく有効無効を設定するだけで良さそうだったかも。

attr_accessor :middleware_enabled

def initialize
  self.middleware_enabled = !Rails.env.development? && !Rails.env.test?
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらに1票!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

設定見直してマージしておきます。 👌

@@ -1,13 +1,15 @@
module SgFargateRails
class Config
attr_reader :proxy_ip_addresses
attr_accessor :middleware_enabled_rails_envs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらに1票!

@aki77 aki77 merged commit fb76d8c into dev Nov 8, 2023
3 checks passed
@aki77 aki77 deleted the fix-maintenance branch November 8, 2023 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants