530 Commits

Author SHA1 Message Date
Danny van Kooten
d1728ba501 resolve now at runtime to make sure it always points to today (for when fathom tab is not closed over several days) 2018-09-17 16:26:46 +02:00
Danny van Kooten
fc2e9d2fd1 host overpass font locally 2018-09-14 10:41:44 +02:00
Danny van Kooten
4d2e8b5f6d update to babel v8 2018-09-14 10:25:31 +02:00
Danny van Kooten
b75506ce8f simplify tracker to not depend on modules, we want this file as small as possible anyway. prevents #124 2018-09-14 10:25:21 +02:00
Danny van Kooten
86e50ca573 get rid of timezone offset as we're already populating date object from timestamp 2018-09-13 11:47:48 +03:00
Danny van Kooten
5ef2b166ab last 7 & last 30 days should be today-6 and today-29 2018-02-01 22:01:19 -09:00
Danny van Kooten
4028dcab68 expire tracking cookie at local midnight, not utc midnight. fixes issue with immediate cookie expiration on negative utc offsets 2018-02-01 21:51:12 -09:00
Danny van Kooten
0d5c5066aa update readme with link to public roadmap 2018-09-12 10:39:43 +02:00
Danny van Kooten
221e6394de assume dashboard is public when there are no users in connected datastore. #117 2018-09-12 09:36:59 +02:00
Danny van Kooten
291d53fcaf add CountUsers func to sqlstore 2018-09-12 09:11:50 +02:00
Danny van Kooten
b860937107 always clear request context, even for unauthorized requests 2018-09-12 09:07:55 +02:00
Danny van Kooten
3b721b88a8 sanitize email address before saving to datastore 2018-09-10 09:26:15 +02:00
Danny van Kooten
20f79b5b97
Merge pull request #113 from ViBiOh/adding_csp_directives
Adding CSP directives in README
2018-08-27 09:23:25 +02:00
Vincent Boutour
0a708af9bc
Adding CSP directives in README 2018-08-26 18:43:03 +02:00
Danny van Kooten
b6aa00caef add tests for aggregating referrer stats 2018-08-09 15:04:38 +02:00
Danny van Kooten
8313c64610 add tests for aggregating page-specific stats 2018-08-09 14:57:35 +02:00
Danny van Kooten
2ccbfbf372 add tests for aggregating site-wide stats 2018-08-09 14:43:42 +02:00
Danny van Kooten
064b5cb038 re-use buffer (to get rid of allocation) & separate inserts vs. updates early on in collect handler. 2018-08-08 09:43:06 +02:00
Danny van Kooten
c09fda89a3 refactor date logic for preset periods. switch out this week and this month for last-7 and last-30. closes #43 2018-08-07 09:20:22 +02:00
Danny van Kooten
720fa4a5da clear gorilla context after request is handled 2018-08-07 08:48:22 +02:00
Danny van Kooten
defb36b001 set WriteTimeout and ReadTimeout on http.Server 2018-08-05 12:14:34 +02:00
Danny van Kooten
c71907033e add --json flag to stats command 2018-08-01 14:43:19 +02:00
Danny van Kooten
01474759c6 add stats command for getting site-wide stats via cli. 2018-08-01 14:03:44 +02:00
Danny van Kooten
5d24865936 add --skip-bcrypt option to register command 2018-08-01 13:23:41 +02:00
Danny van Kooten
94805b6e80 remove alias for register command 2018-08-01 13:13:54 +02:00
Danny van Kooten
33ffa557ee move setting pwd & comparing into user model + tests 2018-08-01 13:13:42 +02:00
Danny van Kooten
4ecaff85ac don't parse database driver from URL to also support mysql and sqlite. 2018-07-31 15:29:15 +02:00
Danny van Kooten
8f4a34282e Merge branch 'feature/database-url' of https://github.com/Calyhre/fathom into Calyhre-feature/database-url
* 'feature/database-url' of https://github.com/Calyhre/fathom:
  Update .env.example
  Add support for FATHOM_DATABASE_URL
2018-07-31 15:09:45 +02:00
Danny van Kooten
62ec1f7d41 add built-in support for letsencrypt using autocert. closes #18 2018-07-31 15:05:34 +02:00
Charley DAVID
d1387e4dd1
Update .env.example 2018-07-31 08:41:08 -03:00
Charley DAVID
98970057a2
Add support for FATHOM_DATABASE_URL 2018-07-31 08:41:08 -03:00
Danny van Kooten
773a65ff94 Merge branch 'master' of https://github.com/usefathom/fathom
* 'master' of https://github.com/usefathom/fathom:
  Revert "link[href] is already an absolute URL"
2018-07-30 10:51:25 +02:00
Danny van Kooten
e90e100f18 fix query args for batch updating pageviews 2018-07-30 10:51:20 +02:00
Danny van Kooten
b6f3be0e8e build postgres dsn string dynamically 2018-07-30 09:33:49 +02:00
Danny van Kooten
98c5487a58
Merge pull request #102 from usefathom/revert-98-patch-5
Revert "link[href] is already an absolute URL", create <a> element for correct parsing.
2018-07-27 09:08:55 +02:00
Danny van Kooten
3418e81ea5
Revert "link[href] is already an absolute URL" 2018-07-27 09:08:25 +02:00
Danny van Kooten
fe624a63a1 update all godeps 2018-07-27 09:03:18 +02:00
Danny van Kooten
1c2682878e update github.com/mattn/go-sqlite3 dep 2018-07-27 08:54:46 +02:00
Danny van Kooten
d03cdf88f2 Merge branch 'master' of https://github.com/usefathom/fathom
* 'master' of https://github.com/usefathom/fathom:
  link[href] is already an absolute URL
2018-07-27 08:52:58 +02:00
Danny van Kooten
658581b744 show prettier error msg when connecting to database fails 2018-07-27 08:52:53 +02:00
Danny van Kooten
c8eef57e2a
Merge pull request #98 from da2x/patch-5
link[href] is already an absolute URL
2018-07-23 07:28:26 +02:00
Daniel Aleksandersen
c6ec64a267
link[href] is already an absolute URL
a[href] and link[href] will both normalize to an absolute URL so there is no need to create an extra a element here.
2018-07-23 05:53:13 +02:00
Danny van Kooten
6a27475faf
Merge pull request #96 from SimePel/master
config: split up Parse into LoadEnv & Parse func. Thanks @SimePel!
2018-07-16 10:57:19 +02:00
SimePel
34b7eab555 fix typo 2018-07-16 11:14:30 +07:00
SimePel
a301dec1a3 add tests for LoadEnv func 2018-07-15 21:10:26 +07:00
SimePel
64b131f7f5 add separate function for loading env values from file 2018-07-15 21:09:44 +07:00
Danny van Kooten
2ef550bc27 reduce number of memory allocations in hot path 2018-07-15 10:05:03 +02:00
Danny van Kooten
b2d881e31b optimize sql generation in datastore.InsertPageviews func. 2018-07-15 09:36:28 +02:00
Danny van Kooten
1fea0dc66f return error from datastore.Close func 2018-07-15 09:20:07 +02:00
Danny van Kooten
1e128e6ad7 use simple for loop in bulk datastore funcs for minor perf improvement 2018-07-15 07:37:45 +02:00