LiteSun commented on code in PR #3435:
URL: https://github.com/apache/apisix-dashboard/pull/3435#discussion_r3628771717
##########
src/components/form-slice/FormPartSSL/index.tsx:
##########
@@ -54,12 +54,13 @@ const FormSectionClient = () => {
defaultValue={1}
min={0}
/>
- <InputWrapper label={t('form.ssls.client.skipMtlsUriRegex')}>
- <FormItemSwitch
- control={control}
- name="client.skip_mtls_uri_regex"
- />
- </InputWrapper>
+ {/* array<string> of URI regexes — a TagsInput, not a Switch:
+ the boolean broke this field both ways (#3417) */}
+ <FormItemTagsInput
Review Comment:
Mantine `TagsInput` splits on commas by default, including pasted text. A
valid regex such as `^/v[0-9]{1,3}$` is therefore stored as two tags. Please
disable comma splitting for this raw string field (for example with
`splitChars={[]}`) and cover a comma-containing regex in the round-trip test.
##########
src/components/form-slice/FormPartUpstream/FormSectionChecks.tsx:
##########
@@ -76,7 +75,10 @@ const FormSectionChecksActive = () => {
name={np('checks.active.http_path')}
label={t('form.upstreams.checks.active.http_path')}
/>
- <FormItemLabels
+ {/* array<string> of raw header lines — a TagsInput, not the Labels
+ widget (which produces an object and broke this field both ways,
+ #3417) */}
+ <FormItemTagsInput
Review Comment:
`TagsInput` also splits comma-containing header values. For example,
`Accept: text/html,application/json` becomes two array entries, with the second
entry no longer a valid header line. Please disable comma splitting for this
field and add a round-trip case with a comma in the value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]