mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-02-10 18:05:07 +08:00
[feature] Add useforrequest in request filtering
This commit is contained in:
@ -25,12 +25,14 @@ function SecuritySettings() {
|
||||
const [activeTab, setActiveTab] = useState('ip-filtering');
|
||||
const [localRules, setLocalRules] = useState([]);
|
||||
const [localSettings, setLocalSettings] = useState({
|
||||
useforrequest: false,
|
||||
allowPrivateIPAddress: false,
|
||||
allowMetaIPAddress: false
|
||||
});
|
||||
const [hasChanges, setHasChanges] = useState(false);
|
||||
|
||||
const REQUEST_FILTERING_PATHS = {
|
||||
useforrequest: 'services.CoAuthoring.ipfilter.useforrequest',
|
||||
allowPrivateIPAddress: 'services.CoAuthoring.request-filtering-agent.allowPrivateIPAddress',
|
||||
allowMetaIPAddress: 'services.CoAuthoring.request-filtering-agent.allowMetaIPAddress'
|
||||
};
|
||||
@ -207,6 +209,16 @@ function SecuritySettings() {
|
||||
<h2 className={styles.sectionTitle}>IP Address Filtering</h2>
|
||||
<p className={styles.sectionDescription}>Control access based on IP address types to enhance security.</p>
|
||||
|
||||
<div className={styles.formRow}>
|
||||
<Checkbox
|
||||
label='Use IP filtering for requests'
|
||||
checked={localSettings.useforrequest}
|
||||
onChange={value => handleFieldChange('useforrequest', value)}
|
||||
description='Enable IP filtering for incoming requests. When disabled, rules and allow lists are ignored.'
|
||||
error={getFieldError(REQUEST_FILTERING_PATHS.useforrequest)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className={styles.formRow}>
|
||||
<Checkbox
|
||||
label='Allow Private IP Addresses'
|
||||
|
||||
Reference in New Issue
Block a user