diff --git a/config/environments/development.rb b/config/environments/development.rb index e5893a2..b0480e8 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -4,6 +4,11 @@ # Let GitHub Codespaces open the app through its forwarded address. config.hosts << ".app.github.dev" + # Codespaces serves the app over HTTPS through a proxy that talks plain HTTP to Rails, so the + # browser's Origin header never matches and every form post would fail the CSRF origin check. + # The authenticity token is still checked. + config.action_controller.forgery_protection_origin_check = false if ENV["CODESPACES"] + # Settings specified here will take precedence over those in config/application.rb. # Make code changes take effect immediately without server restart.