File tree Expand file tree Collapse file tree 3 files changed +24
-25
lines changed Expand file tree Collapse file tree 3 files changed +24
-25
lines changed Original file line number Diff line number Diff line change 11Configuration
22=============
33
4- We must first configure the client to allow certain hosts to report
5- errors. This prevents abuse so somebody else couldn't start sending
6- errors to your account from their site.
4+ To get started, you need to configure Raven.js to use your Sentry DSN:
75
8- **Note **: Without setting this, all messages will be rejected!
9-
10- This can be found under the *Project Details * page in Sentry.
11-
12- Now need to set up Raven.js to use your Sentry DSN.
13-
14- .. code-block :: javascript
6+ .. sourcecode :: javascript
157
168 Raven.config('___PUBLIC_DSN___').install()
179
1810At this point, Raven is ready to capture any uncaught exception.
1911
20- Although, this technically works, this is not going to yield the greatest
21- results. It's highly recommended to next check out :doc: `usage `.
22-
2312Optional settings
2413-----------------
2514
26- ``Raven.config() `` can be passed an optional object for extra configuration.
15+ ``Raven.config() `` can optionally be passed an additional argument for extra configuration:
16+
17+ .. sourcecode :: javascript
18+
19+ Raven.config('___PUBLIC_DSN___', {
20+ release: '1.3.0'
21+ }).install()
22+
23+ Those configuration options are documented below:
2724
2825.. describe :: logger
2926
Original file line number Diff line number Diff line change @@ -28,17 +28,6 @@ scripts. For all details see :doc:`install`.
2828
2929 <script src="https://cdn.ravenjs.com/2.0.4/raven.min.js"></script>
3030
31- Configuring the Project
32- -----------------------
33-
34- We must first configure Sentry to allow certain hosts to report errors.
35- This prevents abuse so somebody else couldn't start sending errors to your
36- account from their site.
37-
38- This can be found under the **Project Settings ** page in Sentry. You'll need
39- to add each domain that you plan to report from into the **Allowed Domains **
40- box. Alternatively if you're not worried about CORS security, you can simply
41- enter ``* `` to whitelist all domains.
4231
4332Configuring the Client
4433----------------------
Original file line number Diff line number Diff line change @@ -289,3 +289,16 @@ deduplicate by taking into account the URL:
289289 .. sentry :edition :: hosted, on-premise
290290
291291 For more information, see :ref: `custom-grouping `.
292+
293+ Preventing Abuse
294+ ----------------
295+
296+ By default, the Sentry server accepts errors from any host. This can lead to an abuse
297+ scenario where a malicious party triggers JavaScript errors from a different website that are
298+ accepted by your Sentry Project. To prevent this, it is recommended to whitelist known hosts where your
299+ JavaScript code is operating.
300+
301+ This setting can be found under the **Project Settings ** page in Sentry. You'll need
302+ to add each domain that you plan to report from into the **Allowed Domains **
303+ box. When an error is collected by Raven.js and transmitted to Sentry, Sentry will verify the ``Origin `` and/or
304+ ``Referer `` headers of the HTTP request to verify that it matches one of your allowed hosts.
You can’t perform that action at this time.
0 commit comments