mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-03-22 22:19:04 +09:00
Merge pull request #82 from kevinmcconnell/script-cable-path
Allow serving cable traffic under `$SCRIPT_NAME`
This commit is contained in:
7
app/helpers/cable_helper.rb
Normal file
7
app/helpers/cable_helper.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
module CableHelper
|
||||
def script_aware_action_cable_meta_tag
|
||||
tag.meta \
|
||||
name: "action-cable-url",
|
||||
content: "#{request.script_name}#{ActionCable.server.config.mount_path}"
|
||||
end
|
||||
end
|
||||
@@ -12,6 +12,7 @@
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
<%= current_user_meta_tags %>
|
||||
<%= script_aware_action_cable_meta_tag %>
|
||||
|
||||
<%= tag.meta name: "vapid-public-key", content: Rails.configuration.x.vapid.public_key %>
|
||||
<%= tag.meta name: "turbo-prefetch", content: "true" %>
|
||||
|
||||
Reference in New Issue
Block a user