Closed rassom closed 3 years ago
@arindambarman-intercom Any chance you could take a look at this? Thanks 🙏
Hey @rassom sorry missed this earlier. Can you share your integration script? From the error message itself it looks like it is unrelated to CSP. Also can paste the stacktrace?
Hey @arindambarman-intercom,
Thanks for replying.
Found out that the error was caused by (invalid) HAML syntax.
Invalid syntax:
- if logged_in?
= intercom_script_tag({
:app_id => 'your-app-id',
:user_id => current_user.id,
:email => current_user.email,
:name => current_user.name,
:created_at => current_user.created_at
}, {
:secret => 'your-apps-api-secret',
:widget => {:activator => '#Intercom'},
:nonce => get_nonce_from_your_csp_framework
})
Valid syntax:
- if logged_in?
= intercom_script_tag({ |
:app_id => 'your-app-id', |
:user_id => current_user.id, |
:email => current_user.email, |
:name => current_user.name, |
:created_at => current_user.created_at |
}, { |
:secret => 'your-apps-api-secret', |
:widget => {:activator => '#Intercom'}, |
:nonce => get_nonce_from_your_csp_framework |
}) |
So all good and working now.
Sorry for the inconvenience and have a great weekend.
Best wishes, Rasmus
I'm using Rails's built-in CSP, so cannot use the instructions provided for the Twitter Secure Headers gem (https://github.com/intercom/intercom-rails#automatic-insertion).
When using the manual insertion method instead (https://github.com/intercom/intercom-rails#manual-insertion) to make Intercom work with CSP - content security policy - , I get the error: intercom rails invalid filter name app_id
Any ideas why the
intercom rails invalid filter name app_id
error is happening?Version info