-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added cors plugin form #1733
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1733 +/- ##
===========================================
- Coverage 72.45% 52.25% -20.20%
===========================================
Files 132 38 -94
Lines 5721 2660 -3061
Branches 649 0 -649
===========================================
- Hits 4145 1390 -2755
+ Misses 1334 1082 -252
+ Partials 242 188 -54
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
actually, the Form style needs to be updated. You could split it into 2 issues:
|
Deploy preview for apisix-dashboard ready! Built with commit 4138c5b |
<Form | ||
form={form} | ||
{...FORM_ITEM_LAYOUT} | ||
initialValues={{ allow_origins_by_regex: [''] }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only add initial values for this field here?
'component.pluginForm.cors.allow_origins.extra': 'For example: https://somehost.com:8081', | ||
'component.pluginForm.cors.allow_methods.tooltip': 'Which Method is allowed to enable CORS, such as: GET, POST etc. Multiple method use , to split. When allow_credential is false, you can use * to indicate allow all any method. You also can allow any method forcefully using ** even already enable allow_credential, but it will bring some security risks.', | ||
'component.pluginForm.cors.allow_headers.tooltip': 'Which headers are allowed to set in request when access cross-origin resource. Multiple value use , to split. When allow_credential is false, you can use * to indicate allow all request headers. You also can allow any header forcefully using ** even already enable allow_credential, but it will bring some security risks.', | ||
'component.pluginForm.cors.expose_headers.tooltip': ' Which headers are allowed to set in response when access cross-origin resource. Multiple value use , to split.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space??
<Select | ||
mode="multiple" | ||
optionLabelProp="label" | ||
onChange={(value) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onChange={(value) => { | |
onChange={(value: string[]) => { |
<Switch /> | ||
</Form.Item> | ||
|
||
<Form.List name={['allow_origins_by_regex']}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Form.List name={['allow_origins_by_regex']}> | |
<Form.List name="allow_origins_by_regex"> |
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
added cors plugin form
What changes will this PR take into?
Please update this section with detailed description.
Related issues
fix/resolve #1
Checklist: