|
70 | 70 | # Annotate rendered view with file names.
|
71 | 71 | config.action_view.annotate_rendered_view_with_filenames = true
|
72 | 72 |
|
73 |
| - # Uncomment if you wish to allow Action Cable access from any origin. |
74 |
| - # config.action_cable.disable_request_forgery_protection = true |
75 |
| - pf_host = "#{ENV['CODESPACE_NAME']}-3000.#{pf_domain}" |
76 |
| - config.hosts << pf_host |
77 |
| - config.hosts << '.ngrok.io' |
78 |
| - config.action_cable.allowed_request_origins = ["https://#{pf_host}"] |
79 |
| - |
80 | 73 | # Raise error when a before_action's only/except options reference missing actions.
|
81 | 74 | config.action_controller.raise_on_missing_callback_actions = true
|
82 | 75 |
|
83 | 76 | # Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
|
84 | 77 | # config.generators.apply_rubocop_autocorrect_after_generate!
|
85 | 78 |
|
86 |
| - # Enable to edit on GitHub Codespaces && allow requests from our preview domain. |
| 79 | + # Uncomment if you wish to allow Action Cable access from any origin. |
| 80 | + # config.action_cable.disable_request_forgery_protection = true |
87 | 81 | pf_domain = ENV['GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN']
|
88 |
| - config.action_dispatch.default_headers = { |
89 |
| - 'X-Frame-Options' => "ALLOW-FROM #{pf_domain}" |
90 |
| - } |
| 82 | + pf_host = "#{ENV['CODESPACE_NAME']}-3000.#{pf_domain}" |
| 83 | + config.hosts << pf_host |
| 84 | + config.hosts << '.ngrok.io' |
| 85 | + config.action_cable.allowed_request_origins = ["https://#{pf_host}"] |
| 86 | + |
| 87 | + # Enable to edit on GitHub Codespaces && allow requests from our preview domain. |
| 88 | + config.action_dispatch.default_headers = { 'X-Frame-Options' => "ALLOW-FROM #{pf_domain}" } |
91 | 89 | end
|
0 commit comments