Skip to content

Commit 0500105

Browse files
committed
switch to vendored sentry JS SDK
1 parent 364d70b commit 0500105

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

src/web/csp.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ impl Csp {
8383
//
8484
// This `.unwrap` is safe since the `Write` impl on str can never fail.
8585
write!(result, "; script-src 'nonce-{}'", self.nonce).unwrap();
86-
result.push_str(" https://browser.sentry-cdn.com https://js.sentry-cdn.com");
8786
}
8887

8988
fn render_svg(&self, result: &mut String) {
@@ -199,7 +198,7 @@ mod tests {
199198
style-src 'self'; \
200199
font-src 'self'; \
201200
connect-src 'self' *.sentry.io; \
202-
script-src 'nonce-{}' https://browser.sentry-cdn.com https://js.sentry-cdn.com",
201+
script-src 'nonce-{}'",
203202
csp.nonce()
204203
)),
205204
csp.render(ContentType::Html)

templates/base.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
{% if config.sentry_dsn %}
2121
<script
22-
src="https://browser.sentry-cdn.com/7.105.0/bundle.tracing.min.js"
23-
integrity="sha384-XFfw9fN0ZxeLnveKcWT/zLOcibWw9ewRfNiUu/teAuMfP4G3Oy7lLh7rN3rX2T7M"
24-
crossorigin="anonymous"
25-
></script>
22+
nonce="{{ csp_nonce }}"
23+
src="/-/static/sentry/bundle.tracing.7.105.0.min.js"
24+
type="text/javascript">
25+
</script>
2626

2727
<script nonce="{{ csp_nonce }}">
2828
Sentry.init({

vendor/sentry/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Functional Software, Inc. dba Sentry
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9+
of the Software, and to permit persons to whom the Software is furnished to do
10+
so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

vendor/sentry/bundle.tracing.7.105.0.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)