File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
apps/hostd/contexts/config Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' hostd ' : minor
3
+ ---
4
+
5
+ The address configuration setting now expects only the hostname without a port. Closes https://github.com/SiaFoundation/hostd/issues/536
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
} from './types'
11
11
import { calculateMaxCollateral } from './transform'
12
12
import { currencyOptions } from '@siafoundation/react-core'
13
+ import { Maybe } from '@siafoundation/types'
13
14
14
15
type Categories = 'host' | 'pricing' | 'DNS' | 'bandwidth' | 'RHP3'
15
16
@@ -46,9 +47,16 @@ export function getFields({
46
47
category : 'host' ,
47
48
title : 'Address' ,
48
49
description : < > The network address of the host.</ > ,
49
- placeholder : 'my.host.com:9982 ' ,
50
+ placeholder : 'my.host.com' ,
50
51
validation : {
51
52
required : 'required' ,
53
+ validate : {
54
+ noProtocol : ( value : Maybe < string > ) =>
55
+ ! / ^ h t t p s ? : \/ \/ / . test ( value || '' ) ||
56
+ 'must not start with http:// or https://' ,
57
+ noPort : ( value : Maybe < string > ) =>
58
+ ! / : \d + $ / . test ( value || '' ) || 'must not include port' ,
59
+ } ,
52
60
} ,
53
61
} ,
54
62
maxContractDuration : {
You can’t perform that action at this time.
0 commit comments