Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
reesericci committed Mar 18, 2024
1 parent 5ba0c23 commit db0f26c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@
maskAllText: true,
blockAllMedia: true,
}),
Sentry.feedbackIntegration({
colorScheme: "system",
}),
],

beforeSend(event, hint) {
// Check if it is an exception, and if so, show the report dialog
if (event.exception && event.event_id) {
Sentry.showReportDialog({ eventId: event.event_id });
}
return event;
},
});
<% end %>
<% end %>
Expand Down
6 changes: 4 additions & 2 deletions config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@

Rails.application.configure do
config.content_security_policy do |policy|
policy.default_src :none
policy.default_src :none
policy.connect_src :self, "https://rebound.postmarkapp.com/check", "https://*.sentry.io/"
policy.font_src :self, :data
policy.img_src :self, :data
policy.object_src :none
policy.script_src :self, "'strict-dynamic'", "https://code.ionicframework.com", "https://cdn.jsdelivr.net/npm/toastify-js", "https://ga.jspm.io/npm:@sentry/", "https://ga.jspm.io/npm:@sentry-internal/", "https://rebound.postmarkapp.com/", "https://esm.sh/v135/[email protected]/", "https://ga.jspm.io/npm:[email protected]/", "https://esm.sh/[email protected]/"
policy.script_src :self, "'strict-dynamic'", "/assets/application-fc375a13c2567d620a5507305e2b53993b07847f.js" "https://code.ionicframework.com", "https://cdn.jsdelivr.net/npm/toastify-js", "https://ga.jspm.io/npm:@sentry/", "https://ga.jspm.io/npm:@sentry-internal/", "https://rebound.postmarkapp.com/", "https://esm.sh/v135/[email protected]/", "https://ga.jspm.io/npm:[email protected]/", "https://esm.sh/[email protected]/"

Check warning on line 14 in config/initializers/content_security_policy.rb

View workflow job for this annotation

GitHub Actions / StandardRB

config/initializers/content_security_policy.rb#L14

Combine "/assets/application-fc375a13c2567d620a5507305e2b53993b07847f.js" and "https://code.ionicframework.com" into a single string literal, rather than using implicit string concatenation. Or, if they were intended to be separate method arguments, separate them with a comma.
policy.style_src :self, "https://unpkg.com/cursor-chat/dist/style.css", "https://code.ionicframework.com", "https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"
policy.style_src_attr :self, "'unsafe-inline'"
policy.script_src_attr :self, "'unsafe-inline'"
policy.style_src_elem :self, "'unsafe-inline'", "https://unpkg.com/cursor-chat/dist/style.css", "https://code.ionicframework.com", "https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"

policy.frame_ancestors :self
policy.base_uri :self
policy.form_action :self
Expand Down

0 comments on commit db0f26c

Please sign in to comment.