mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Be more specific on allowed request origins by adding OFN_URL
+ add same configuration for production
This commit is contained in:
@@ -48,6 +48,9 @@ Openfoodnetwork::Application.configure do
|
||||
reconnect_attempts: 1
|
||||
}
|
||||
|
||||
config.action_cable.url = "#{ENV['OFN_URL']}/cable"
|
||||
config.action_cable.allowed_request_origins = [/http:\/\/#{ENV['OFN_URL']}\/*/, /https:\/\/#{ENV['OFN_URL']}\/*/]
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ Openfoodnetwork::Application.configure do
|
||||
}
|
||||
|
||||
config.action_cable.url = "#{ENV['OFN_URL']}/cable"
|
||||
config.action_cable.allowed_request_origins = [/http:\/\/*/, /https:\/\/*/]
|
||||
config.action_cable.allowed_request_origins = [/http:\/\/#{ENV['OFN_URL']}\/*/, /https:\/\/#{ENV['OFN_URL']}\/*/]
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
Reference in New Issue
Block a user