Commit Graph

31 Commits

Author SHA1 Message Date
oliverch
874d27158d feat: add /robots.txt (#1355)
* feat: add /robots.txt

* disallow all crawler by default.
2019-09-16 16:21:08 -05:00
Kenshi Kamata
667b9fdf65 Fix typo (#1358)
* fix duplicated 'the'

* fix typo found by misspell
2019-08-27 10:55:09 -07:00
jhawk28
ba9dc5470e add support for a host in ensurePortFormat (#1342)
* add support for an host in ensurePortFormat
using a host enables the ability to bind to a specific interface

* add support for an host in ensurePortFormat
using a host enables the ability to bind to a specific interface
2019-08-14 14:46:32 -04:00
Yi Tang
7de77889ad support goproxy for list/download command (#1304) 2019-07-15 14:07:24 -04:00
Benjamin
e832c83ecd [debug] allow to expose activate via config (#1284)
This CL addresses issue #1177 introducing two new configuration params
allowing to activate pprof.
- `ATHENS_ENABLE_PPROF`
- `ATHENS_PPROF_PORT`

pprof won't be exposed by default.
2019-06-24 20:59:15 +02:00
Marwan Sulaiman
76fb786324 downloadProtocol: support multi-proxy environments with DownloadFile (#1230)
* downloadProtocol: support multi-proxy environments with DownloadFile

* remove debugging lines

* update config tests

* download/mode: add tests for DownloadFile and friends

* add documentation to Download File
2019-06-08 00:30:07 -04:00
Marwan Sulaiman
0cac0edbf1 actions: support proxying sum db urls (#1208)
* actions: support proxying sum db urls

* remove proxy prefix

* add docs for checksum db

* more docs

* typo

* typo

* typo

* typo

* typo

* typo

* typo

* typo

* move checksum db into its own section
2019-05-08 17:09:07 -07:00
Marwan Sulaiman
c11212ba16 pkg/config: ensure port format (#1187)
* pkg/config: ensure port format

* fix tests
2019-04-14 11:21:45 -04:00
Marwan Sulaiman
71aeca7f30 config: accept PORT env + ensure colon (#1181)
* config: accept PORT env + ensure colon

* ensure precedence
2019-04-08 12:54:25 -07:00
Marwan Sulaiman
c31610c1ad pkg/config: ensure env vars override defaults (#1173) 2019-04-01 10:26:16 -04:00
Pontus Leitzler
d9e0df8643 Config improvements - rename file & remove default (#1103)
* Rename config.dev.toml to config-example.toml

* Updating helm docs to point to the new helm chart repository (#1102)

* Updating helm docs to point to the new helm chart repository

Fixes https://github.com/gomods/athens/issues/1099
Follow-up to https://github.com/gomods/athens/pull/1097/files

* fixes

* Helm chart: Fix ingress setup (#1086)

* Helm chart: Fix ingress setup

The ingress part of the Helm chart contained references to
not-existing templates and values. Additionally, the deployment used
some no longer available health-check URLs which prevented it from
being marked as ready.

* Make readiness and liveness paths depend on the image.tag

* Add read from .athens.toml (from pwd, then home)

* Remove config lookup from HOME

* Revert "Rename config.dev.toml to config-example.toml"

This reverts commit 9c02956406.

* Fix comment
2019-03-26 16:56:18 -04:00
Marwan Sulaiman
fb9437ddff pkg/stash: implement a Redis lock for stashing (#1116)
* pkg/stash: implement a Redis lock for stashing

* fix tests

* fix op
2019-03-11 02:48:04 -04:00
Marwan Sulaiman
12ce2a6499 pkg/stash: add Etcd as a SingleFlight backend (#1070)
* pkg/stash: add Etcd as a SingleFlight backend

* fix config tests

* fmt

* pr fixes

* fix conflicts
2019-02-22 11:35:45 -08:00
fsouza
3525cdaa4a pkg/config: make sure envconfig doesn't override config values for port (#1074)
Fixes #1037.

envconfig can't actually support that use case, and because athens was
using the `default:` tag only for the port field, handling this manually
is the easiest and functional solution.
2019-02-19 12:11:33 -05:00
marpio
831b5616b5 Check code defaults and config.toml defaults are the same (#1073)
* rm TraceExporterURL and StatsExporter default vals

* add test

* fix test

* revert TraceExporterURL and StatsExporter changes

* improve test error msg

* ignore GoEnv since it's set in CI and dev differently
2019-02-19 07:46:29 -08:00
Marwan Sulaiman
94360f3930 pkg/config: make StatsExporter consistent with config.toml (#1072) 2019-02-18 22:19:44 +01:00
Marwan Sulaiman
dc358ba096 Keep code defaults and config.toml defaults the same (#1062) 2019-02-15 20:48:21 -08:00
marpio
c3d1d14d23 Use default conf values if file not found (#1022)
* default conf if no file provided

* move to the config pkg

* rm default config path

* rm log
2019-02-14 11:32:53 -08:00
Marwan Sulaiman
5870aeee8d Remove Buffalo (#1010)
* Remove Buffalo

* gofmt

* pr fixes

* fix subrouter

* bring back secure middleware + pr fixes

* better place for subrouter

* vendor
2018-12-22 20:24:25 -05:00
Marwan Sulaiman
2d2bd8eff9 only check config perms in production (#1013) 2018-12-22 11:33:57 -05:00
Tomasz Tomalak
fb696b2d84 Add prometheus metrics collectors for http handlers (#958)
* Add prometheus metrics exporter for http handlers

* Use prometheus from opencensus

* Add comment to unused func() param

* Add package names to operation description in observ package

* Sort exported/unexported functions
2018-12-20 10:19:22 +01:00
Manu Gupta
5eba6f2e47 File permissions on config files allow more restrictive setting (#966)
* File permissions on config files allow more restrictive setting

* Make the tests a bit more readable

* Bring back the tests dude

* Update error message

* remove else

* Add more test cases

* Change Lstat to Stat

* Add note for umask

* Make sure the permissions are 0600 or lower

* Update config file

* Do not check for windows

* Fix CI errors

* Fix CI test
2018-12-18 16:26:04 +01:00
Pontus Leitzler
fe032bc5ca Add support for TLS (#979)
* Add support for TLS

* Fix review comments
2018-12-09 07:27:49 -05:00
Aravind
48f7ca7780 Implement storage.Backend for azureblob (#917) 2018-11-29 17:06:19 +01:00
Manu Gupta
c11212601b Checks for windows permissions (#902)
* Checks for windows permissions

* Fix bug

* fix test

* Update perms

* Fix perms
2018-11-20 20:56:35 +01:00
marpio
4785e9c2b3 Remove storage timeouts (#928)
* remove storage timeouts

* fix tests
2018-11-16 16:00:08 -05:00
marpio
54f92c55d6 Config cleanup (#860)
* add default env vars

* del setRuntimeDefaults

* replace cdn conf with azure config and remove baseURL
2018-11-05 09:04:38 +01:00
Marwan Sulaiman
21dcd5a388 config: flatten Proxy struct (#846)
* config: flatten Proxy struct

* fix mw_test

* gofmt

* add line
2018-11-01 17:21:42 -04:00
Manu Gupta
8f4e3dc3c0 Remove FilterOff from the env var (#837)
* Remove FilterOff from the env var

* Remove test

* Turn off filter by default

* Fix test
2018-10-31 17:37:44 -04:00
Manu Gupta
b600753926 Check for file perms as provided in the conf module (#784)
* Check for file perms as provided in the conf module

* Fix whitespace

* Check for file permissions

* Use only Lstat for error handling and continue if file does not exist

* Update comments to make sure that the todo is more understandable

* conflicts resolved
2018-10-26 12:53:05 -07:00
Marwan Sulaiman
2d589f1945 Remove CSRF option from config (#814) 2018-10-24 10:59:33 +02:00