Skip to content

Commit

Permalink
fix: update case of arguments sent to registration.libp2p.direct
Browse files Browse the repository at this point in the history
At some point it became stricter about the casing of arguments so
update the JSON body to golang-style sentence case instead of
javascript-style camel case.
  • Loading branch information
achingbrain committed Dec 11, 2024
1 parent 9665411 commit 04fa1e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/auto-tls/src/auto-tls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ export class AutoTLS implements AutoTLSInterface {
'Content-Type': 'application/json'
},
body: JSON.stringify({
value: keyAuthorization,
addresses
Value: keyAuthorization,
Addresses: addresses

Check warning on line 358 in packages/auto-tls/src/auto-tls.ts

View check run for this annotation

Codecov / codecov/patch

packages/auto-tls/src/auto-tls.ts#L357-L358

Added lines #L357 - L358 were not covered by tests
}),
...options
})
Expand Down
2 changes: 1 addition & 1 deletion packages/auto-tls/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const DEFAULT_FORGE_ENDPOINT = 'https://registration.libp2p.direct'
export const DEFAULT_FORGE_DOMAIN = 'libp2p.direct'
export const DEFAULT_ACME_DIRECTORY = 'https://acme-v02.api.letsencrypt.org/directory'
export const DEFAULT_PROVISION_TIMEOUT = 120_000
export const DEFAULT_PROVISION_REQUEST_TIMEOUT = 10_000
export const DEFAULT_PROVISION_REQUEST_TIMEOUT = 60_000
export const DEFAULT_PROVISION_DELAY = 5_000
export const DEFAULT_RENEWAL_THRESHOLD = 86_400_000
export const DEFAULT_ACCOUNT_PRIVATE_KEY_NAME = 'auto-tls-acme-account-private-key'
Expand Down
2 changes: 1 addition & 1 deletion packages/auto-tls/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export interface AutoTLSInit {
* How long asking the forge endpoint to answer a DNS challenge can take
* before we retry
*
* @default 10_000
* @default 60_000
*/
provisionRequestTimeout?: number

Expand Down

0 comments on commit 04fa1e8

Please sign in to comment.