Commit Graph

20 Commits

Author SHA1 Message Date
aff13a02fb Added http health check endpoint. (#137)
* Added http health check endpoint.

* Fixed performing POST on GET endpoint.

* Explicitly return http status 200 in health check endpoint.

* Updated changelog.
2019-01-25 19:22:53 +02:00
75d4a30c1f Update dependencies and replace uuid library (#100) 2018-08-10 16:51:32 +03:00
efdd560ee4 API: Differentiate bad TXT update error.
Previous to this commit, if the update message had a valid subdomain but
an invalid TXT the error returned was for a bad subdomain. This can
confuse developers who were POSTing junk TXT records to test acme-dns
:-)

This commit adjusts the `webUpdatePost` error handling such that
`!validSubdomain(input)` and `!validTXT(input)` give distinct errors.

The `!validSubdomain` case should never happen in `webUpdatePost`
because `auth.go`'s `Auth` function already vets the post data
subdomain but I retained the error handling code just in case.

Unit tests for an update with an invalid subdomain and an update with an
invalid TXT are included.
2018-02-27 19:26:15 -05:00
b0cd264c71 Fail on malformed JSON payloads in register endpoint (#24) 2017-11-15 13:52:27 +02:00
fd9ce4606d Get rid of Iris and use julienschmidt/httprouter instead (#20)
* Replace iris with httprouter

* Linter fixes

* Finalize iris removal

* Vendor dependencies for reproducable builds

* Api tests are back
2017-11-14 23:54:29 +02:00
41b2ff5940 Use iris v6 and Go 1.8+ (#10)
* Quick fixes to bring framework up to date

* Script for test running, api tests need complete rewrite

* Removed govendor from tests

* Fix for AutoTLS
2017-08-02 19:25:27 +03:00
2bfeedda4c Fixed iris version to v5 api (#9) 2017-01-30 12:19:22 +02:00
8ddb845ca5 Added IPv6 testcases 2016-12-04 14:19:17 +02:00
cb050c2c92 Modified returned JSON structure 2016-12-03 10:31:15 +02:00
bf9eaf2f32 Added config option to check for a header value for clinet IP 2016-12-02 17:04:16 +02:00
8c99346b01 Remove old commented out code 2016-12-02 16:26:31 +02:00
5f68d84ca5 Removed register GET request in favor of POST, and did required HTTP api changes 2016-12-02 15:42:10 +02:00
c3ac7a211c DB code for CIDR handling 2016-12-01 00:03:08 +02:00
4615826267 Made DB an interface 2016-11-27 23:21:46 +02:00
9d634090f1 Linter fix 2016-11-27 19:46:50 +02:00
5072b231af Refactored tests 2016-11-27 19:41:54 +02:00
3ae7dee8ea Fixed race conditions in tests 2016-11-26 14:23:08 +02:00
1b3f6ab6b6 Be less verbose as default 2016-11-26 11:12:58 +02:00
2406bf8d44 More API tests and removal of dead code 2016-11-24 01:37:24 +02:00
41243793be API tests 2016-11-24 00:31:52 +02:00