We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6fea56 commit fd18e61Copy full SHA for fd18e61
config/environments/development.rb
@@ -69,4 +69,15 @@
69
70
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
71
# config.generators.apply_rubocop_autocorrect_after_generate!
72
+
73
+ pf_domain = ENV['GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN']
74
+ config.action_dispatch.default_headers = {
75
+ 'X-Frame-Options' => "ALLOW-FROM #{pf_domain}"
76
+ }
77
78
+ # Allow requests from our preview domain.
79
+ pf_host = "#{ENV['CODESPACE_NAME']}-3000.#{pf_domain}"
80
+ config.hosts << pf_host
81
82
+ config.action_cable.allowed_request_origins = ["https://#{pf_host}"]
83
end
0 commit comments