Merge pull request #113 from ViBiOh/adding_csp_directives

Adding CSP directives in README
This commit is contained in:
Danny van Kooten 2018-08-27 09:23:25 +02:00 committed by GitHub
commit 20f79b5b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 3 deletions

View File

@ -31,16 +31,18 @@ For getting a development version of Fathom up & running, go through the followi
To install and run Fathom in production, [have a look at the installation instructions](https://github.com/usefathom/fathom/wiki/Installing-&-running-Fathom).
## Building with Docker
## Docker
### Building
Ensure you have Docker installed and run `docker build -t fathom .`.
Run the container with `docker run -d -p 8080:8080 fathom`.
## Running with Docker
### Running
To run [our pre-built Docker image](https://hub.docker.com/r/usefathom/fathom/), run `docker run -d -p 8080:8080 usefathom/fathom:latest`
#### Tracking snippet
## Tracking snippet
To start tracking, include the following JavaScript on your site and replace `yourfathom.com` with the URL to your Fathom instance.
@ -61,6 +63,15 @@ fathom('trackPageview');
<!-- / Fathom -->
```
### Content Security Policy
If you use a [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) to specify security policies for your website, Fathom requires the following CSP directives (replace `yourfathom.com` with the URL to your Fathom instance):
```
script-src: yourfathom.com;
img-src: yourfathom.com;
```
## Copyright and license
MIT licensed. Fathom and Fathom logo are trademarks of Fathom Analytics.