Commit Graph

50 Commits

Author SHA1 Message Date
Girish Ramakrishnan ceb908bee7 Use constants.TEST 2023-10-01 13:52:19 +05:30
Girish Ramakrishnan ef3d23ebd9 Fix error message 2023-03-14 11:35:10 +01:00
Girish Ramakrishnan f9ec2bc06a cloudflare: add config for default value of proxied 2023-02-11 10:07:46 +01:00
Girish Ramakrishnan b70572a6e9 dns: fqdn only needs domain string
This is from the caas days, when we had hyphenated subdomains flag
2022-11-28 21:56:25 +01:00
Girish Ramakrishnan db03053e05 cloudflare: remove async 2022-03-08 14:30:27 -08:00
Girish Ramakrishnan 5d415d4d7d make cloudflare, gandi, manual, noop, wildcard, netcup, godaddy, namecom async 2022-02-04 14:36:30 -08:00
Girish Ramakrishnan 0373fb70d5 make waitForDns async
cloudflare is partly broken
2022-02-03 17:35:45 -08:00
Girish Ramakrishnan bf51bc25e9 dnsConfig -> domainConfig
this prepares for the incoming settings.getDnsConfig()
2022-01-05 22:56:10 -08:00
Girish Ramakrishnan 5bcf1bc47b merge domaindb.js into domains.js 2021-08-16 14:41:42 -07:00
Girish Ramakrishnan 199eda82d1 Use Array.isArray instead 2021-05-02 11:26:47 -07:00
Johannes Zellner 9bdeff0a39 Always use constants.SECRET_PLACEHOLDER 2020-05-14 23:02:02 +02:00
Girish Ramakrishnan 386566fd4b Fcf: ix crash when no email provide with global key 2020-05-02 18:06:21 -07:00
Girish Ramakrishnan b46d3e74d6 Fix crash in cloudflare error handling 2020-04-23 12:07:54 -07:00
Girish Ramakrishnan b0420889ad cloudflare: add api token support 2019-12-31 16:47:47 -08:00
Girish Ramakrishnan 527819d886 cloudflare: refactor superagent logic 2019-12-31 16:25:49 -08:00
Girish Ramakrishnan 51cb3b0ba8 Move DomainsError to BoxError 2019-10-23 15:15:19 -07:00
Johannes Zellner 127b22d7ce Add dns interface api to inject hidden files for verification 2019-02-09 19:09:51 +01:00
Johannes Zellner 32f8a52c2b add provider specific removePrivateFields to redact tokens and secrets 2019-02-09 11:59:37 +01:00
Girish Ramakrishnan b8f85837fb cloudflare: do not wait for dns if proxied 2019-01-05 18:27:10 -08:00
Girish Ramakrishnan 65210ea91d rework dns api to take domainObject
the DNS backends require many different params, it's just easier to
pass them all together and have backends do whatever.

For example, route53 API requires the fqdn. Some other backends require just the
"part" to insert.

* location - location in the database (where app is installed)
* zoneName - the dns zone name
* domain - domain in the database (where apps are installed into)
* name/getName() - this returns the name to insert in the DNS based on zoneName/location
* fqdn - the fully resolved location in zoneName

verifyDnsConfig also takes a domain object even if it's not in db just so that we can
test even existing domain objects, if required. The IP param is removed since it's not
required.

for caas, we also don't need the fqdn hack in dnsConfig anymore
2019-01-04 22:38:12 -08:00
Girish Ramakrishnan 1e93289f23 cloudflare: preserve proxied parameter 2019-01-03 10:42:09 -08:00
Girish Ramakrishnan ccf0f84598 cloudflare: getDnsRecordsByZoneId -> getDnsRecords
This misleading name creates much confusion
2019-01-03 10:39:10 -08:00
Girish Ramakrishnan 3ec4c7501d cloudflare: rename confusing callback param 2019-01-03 10:39:10 -08:00
Girish Ramakrishnan 698f3c833b cloudflare: Fix crash
{ success: false,
  errors:
   [ { code: 9103, message: 'Unknown X-Auth-Key or X-Auth-Email' } ],
  messages: [],
  result: null }
/home/yellowtent/box/src/dns/cloudflare.js:36
        } else if (error.error_chain[0] && error.error_chain[0].message) {
                                    ^
TypeError: Cannot read property '0' of undefined
    at translateRequestError (/home/yellowtent/box/src/dns/cloudflare.js:36:37)
    at /home/yellowtent/box/src/dns/cloudflare.js:57:83
2018-10-27 12:51:24 -07:00
Girish Ramakrishnan a756345138 consolidate hyphenatedSubdomains handling 2018-09-11 21:41:50 -07:00
Girish Ramakrishnan efa36ab161 cloudflare: Add the chain message 2018-09-07 11:46:10 -07:00
Girish Ramakrishnan 191c85d01f cloudflare: priority is now an integer 2018-09-07 11:44:31 -07:00
Girish Ramakrishnan df66d77a68 cloudflare: Fix crash when there is an external error updating dns records 2018-09-06 12:26:11 -07:00
Girish Ramakrishnan 6f398144cb validate hyphenatedSubdomain 2018-08-25 18:29:55 -07:00
Johannes Zellner b35c81e546 Handle hyphenatedSubdomains in the backend verifyDnsConfig() 2018-08-22 12:16:19 +02:00
Johannes Zellner 163563f400 Remove now unused dnsRecordId 2018-06-29 23:14:06 +02:00
Girish Ramakrishnan 863afc68cb DomainError -> DomainsError 2018-04-29 11:20:12 -07:00
Girish Ramakrishnan 58386b0c54 remove resolveNs 2018-02-08 14:39:35 -08:00
Girish Ramakrishnan 3b987f1970 DNS -> Dns 2018-02-08 12:05:29 -08:00
Girish Ramakrishnan 26c95a25b6 Use the native dns resolver
it now supports cancel()

also, fixes #514
2018-02-08 11:37:58 -08:00
Girish Ramakrishnan ab447120dc cloudflare: del returns 200 now 2018-01-23 14:52:41 -08:00
Girish Ramakrishnan 73800ac6a7 Linter fixes 2018-01-19 09:55:27 -08:00
Girish Ramakrishnan 2ac12de204 Add domains.provider 2018-01-09 15:32:49 -08:00
Johannes Zellner e1be8b669f Do not rely on admin subdomain for dns backend config validation 2017-11-20 19:59:40 +01:00
Johannes Zellner 260ac0afb7 Remove subdomains.js in favor of multidomain capable domains.js 2017-11-20 19:59:26 +01:00
Girish Ramakrishnan 513517b15e cf dns: filter by type and name in the REST API
Otherwise, we will have to implement pagination
2017-09-05 16:07:14 -07:00
Girish Ramakrishnan c47f878203 Set priority for MX records
Fixes #410
2017-08-26 15:54:38 -07:00
Johannes Zellner 2eb5c39388 Improve error reporting for cloudflare 2017-07-31 11:25:17 +02:00
Johannes Zellner 3bf07a3143 Make it work 2017-07-28 18:33:08 +02:00
Johannes Zellner cf883046b3 verifyDnsConfig() api has changed 2017-07-28 16:33:19 +02:00
Johannes Zellner 5e9808ad79 We use single quotes 2017-07-28 16:12:41 +02:00
Johannes Zellner cb7fea97af Keep coding style consistent 2017-07-28 16:10:04 +02:00
Johannes Zellner 3a4ee3ec8c Check for cloudflare email and token 2017-07-28 16:10:04 +02:00
Johannes Zellner a939367ab6 Cleanup linter errors 2017-07-28 16:10:04 +02:00
Abhishek Patil fd52f0ded4 Added support cloudflare DNS TODO:UI
Signed-off-by: Abhishek Patil <abhishek@zeroth.me>
2017-07-28 16:10:04 +02:00