Commit Graph

686 Commits

Author SHA1 Message Date
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
Danny van Kooten e6ee4d0a2e increase buffer size & buffer timeout for collecting pageviews 2018-07-15 07:34:06 +02:00
Danny van Kooten c437f8a221 accept PORT env var for setting server addr (through cascade). #59 2018-07-13 11:49:14 +02:00
Danny van Kooten 19b0ccf5b6 move command declaration into same file as func declaration 2018-07-13 11:48:28 +02:00
Danny van Kooten 82e1216bb3 discard http requests coming from browser prerenders. closes #13 2018-07-12 14:06:07 +02:00
Danny van Kooten a6f9b385a3 option to set sslmode param in postgres & mysql connections using FATHOM_DATABASE_SSLMODE. closes #93 closes #90 closes #80 2018-07-12 13:37:52 +02:00
Danny van Kooten f2683d1f0c buffer insert & updates of pageviews for performance gain under heavy load. closes #24 2018-07-12 13:30:32 +02:00
Danny van Kooten 6eb1d284fd get rid of install script 2018-07-12 09:53:05 +02:00
Danny 42008ab83f get rid of session_id and move knowledge of previous pageview to client. this also gets rid of the (only) index on the pageviews table, allowing for much faster INSERT's. closes #14 2018-07-11 15:03:56 +02:00
Danny d9bce6a0cf set time for dates coming from pikaday too. fixes #88 2018-07-11 14:20:45 +02:00
Danny f7afb8c503 only add path if not already in pagesViewed 2018-07-04 14:43:24 +02:00
Danny van Kooten 37897e9d35 stop sending document title from client, since it is not used right now 2018-06-28 10:37:21 +02:00
Danny van Kooten 9b47ee27ef parse hostname from client instead of relying on http header. fixes #79 2018-06-28 10:37:02 +02:00
Danny van Kooten 67308e3348 default to empty path if parsing from <a> fails. #73 2018-06-23 17:45:53 +02:00
Danny van Kooten ad29167db1 Merge branch 'master' of https://github.com/usefathom/fathom
* 'master' of https://github.com/usefathom/fathom: (23 commits)
  improve security and add persistence for MySQL
  Don’t send Referer headers
  set 'Tk: N' header on resources loaded by client. #65
  disregard requests to /collect with DNT header set to '1'.
  expire client-side session at midnight UTC, for now
  print some info regardless of log level
  use mysql Config.FormatDSN to generate dsn conn string for mysql. closes #56 closes #60
  update go mysql driver
  set explicit charset for mysql tables to workaround key limit of 7xx bytes. #58
  don't concat lastSeen in client-side data. fixes #64
  use https in git clone example in readme (because broader compat). closes #63
  set server addr explicitly in docker-compose file
  update docker-compose file
  add instructions on prebuilt docker img to readme
  get rid of old ana screenshot
  add NULLIF in group statement because of go null values = empty string
  fix postgres errors by converting to null in divisions. closes #54 relates to #52
  use absolute url to readme img
  build npm assets in intermedia docker container so we can auto-build from git push. relates to #49 #51
  client-side assets do not need to be built inside docker container. closes #51
  ...
2018-06-23 17:43:46 +02:00
Danny van Kooten 5d99de5813 lower datepicker timeout 2018-06-23 17:43:44 +02:00
Danny van Kooten b6a4401c2c
Merge pull request #71 from o1ek/master
improve security and add persistence for MySQL
2018-06-23 17:41:43 +02:00
o1ek 033c54c58e
improve security and add persistence for MySQL
• add persistence volume for MySQL
• limit MySQL port exposing only to localhost
• add auto-restart
2018-06-16 11:46:22 +03:00
Danny van Kooten 3888882986
Merge pull request #68 from da2x/patch-3
Don’t send Referer headers. Thanks @da2x!
2018-06-14 09:20:25 +02:00
Daniel Aleksandersen 4bed10990e
Don’t send Referer headers
Remove the `Referer` request header when clicking on referrer links in Fathom. This isn’t a public page so keep the secret of its existence.
https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer
2018-06-13 21:44:48 +02:00
Danny 844c5996ff set 'Tk: N' header on resources loaded by client. #65 2018-06-13 11:15:18 +02:00
Danny 42cd00b8cd disregard requests to /collect with DNT header set to '1'. 2018-06-13 10:44:33 +02:00
Danny 70d97b03a1 expire client-side session at midnight UTC, for now 2018-06-13 10:32:50 +02:00
Danny e795eb1ac1 print some info regardless of log level 2018-06-13 10:10:56 +02:00
Danny 7f61259df3 use mysql Config.FormatDSN to generate dsn conn string for mysql. closes #56 closes #60 2018-06-13 10:04:42 +02:00
Danny 0be328ddc0 update go mysql driver 2018-06-13 10:03:48 +02:00
Danny 958e653b1f set explicit charset for mysql tables to workaround key limit of 7xx bytes. #58 2018-06-13 09:56:32 +02:00
Danny 6e83df2037 don't concat lastSeen in client-side data. fixes #64 2018-06-13 09:08:00 +02:00
Danny 20f2848f53 use https in git clone example in readme (because broader compat). closes #63 2018-06-13 09:05:02 +02:00
Danny 294d111d3b set server addr explicitly in docker-compose file 2018-06-08 16:16:09 +02:00
Danny 536200554b update docker-compose file 2018-06-08 16:12:18 +02:00
Danny b575a8fd60 add instructions on prebuilt docker img to readme 2018-06-08 16:06:42 +02:00
Danny 3f57a0e0a8 get rid of old ana screenshot 2018-06-08 16:00:40 +02:00
Danny 50c0d9ccd0 add NULLIF in group statement because of go null values = empty string 2018-06-08 16:00:32 +02:00
Danny e2294c4b6c fix postgres errors by converting to null in divisions. closes #54 relates to #52 2018-06-08 15:39:38 +02:00
Danny 4a77d0a49c use absolute url to readme img 2018-06-08 14:56:45 +02:00
Danny 70b2cc47bb build npm assets in intermedia docker container so we can auto-build from git push. relates to #49 #51 2018-06-08 14:14:52 +02:00
Danny 96e99d6f96 client-side assets do not need to be built inside docker container. closes #51 2018-06-08 13:45:14 +02:00
Danny a3037801a6 fix typo in readme intro 2018-06-08 13:22:54 +02:00
Danny a253d5eb96 Merge branch 'master' of github.com:usefathom/fathom 2018-06-08 13:18:05 +02:00
Danny 1d155720fa change intro text in readme 2018-06-08 13:18:00 +02:00
Danny van Kooten b95ad71a47
Merge pull request #52 from jaynagpaul/master
Fix SQL syntax for Postgres migrations
2018-06-08 08:21:54 +02:00
Jay Nagpaul 0ab5d12e1b Fix Postgres Migration 2018-06-07 16:36:31 -04:00
Danny van Kooten 2446ccb5bb set x and y on rect elements instead of transforming g element 2018-06-07 10:14:11 +02:00
Danny van Kooten d3dfde315e
Merge pull request #48 from Sh4d1/docker
Add working Docker build and run example in README
2018-06-06 16:03:11 +02:00