1"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/smb/web/web-server-settings"],{1805:(e,n,t)=>{t.r(n),t.d(n,{default:()=>b});var a=t(270),l=t(272),i=t.n(l),s=t(496),o=t(619),d=t(271),c=t(1797),r=t(1799),x=t(1801),u=t(1802),m=t(1803),p=t(1804),h=t(531);const g=s.gql` 2 mutation ClearDomainCache($id: ID!) { 3 clearDomainCache(id: $id) 4 } 5`,j=({features:e,units:n,domainId:t,domainName:l})=>{const i=(0,a.useContext)(c.TranslationContext),[s]=(0,o.useMutation)(g),j=async()=>{try{await s({variables:{id:btoa(`Domain:${t}`)}}),(0,h.addToast)({intent:"success",message:(0,a.jsx)(i,{content:"cacheHasClearedSuccessfuly"})})}catch({graphQLErrors:e}){e.forEach((({message:e,debugMessage:n})=>{(0,h.addToast)({intent:"danger",message:n||e})}))}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(d.Section,{id:"general",title:(0,a.jsx)(i,{content:"general"}),children:[(0,a.jsx)(r.default,{section:"general",name:"mimeTypes",dependentFields:[(0,a.jsx)(p.default,{name:"general[mimeTypes]",label:null,description:(0,a.jsx)(x.default,{children:(0,a.jsx)(i,{content:"example",params:{example:(0,a.jsx)(i,{content:"mimeTypesExample"})}})})},"general[mimeTypes]-text")]}),(0,a.jsx)(r.default,{section:"general",name:"handlers",dependentFields:[(0,a.jsx)(p.default,{name:"general[handlers]",label:null,description:(0,a.jsx)(x.default,{children:(0,a.jsx)(i,{content:"example",params:{example:(0,a.jsx)(i,{content:"handlersExample"})}})})},"general[handlers]-text")]}),(0,a.jsx)(r.default,{section:"general",name:"deny",dependentFields:[(0,a.jsx)(p.default,{name:"general[deny]",label:null,description:(0,a.jsx)(x.default,{children:(0,a.jsx)(i,{content:"example",params:{example:(0,a.jsx)(i,{content:"denyExample"})}})})},"general[deny]-text"),(0,a.jsx)(d.Text,{children:(0,a.jsx)(i,{content:"allow"})},"general[allow]-allow"),(0,a.jsx)(p.default,{name:"general[allow]",label:null,description:(0,a.jsx)(x.default,{children:(0,a.jsx)(i,{content:"example",params:{example:(0,a.jsx)(i,{content:"allowExample"})}})})},"general[allow]-text")],hasFullDescription:!1}),(0,a.jsx)(r.default,{section:"general",name:"directoryIndex",dependentFields:[(0,a.jsx)(d.FormFieldText,{name:"general[directoryIndex]",label:null,description:(0,a.jsx)(x.default,{children:(0,a.jsx)(i,{content:"example",params:{example:(0,a.jsx)(i,{content:"directoryIndexExample"})}})}),size:"xl"},"general[directoryIndex]-text")]}),(0,a.jsx)(r.default,{section:"general",name:"expires",dependentFields:[(0,a.jsx)(u.default,{label:null,name:"general[expires]",multipliers:n.time},"general[expires]-select"),e.nginx?(0,a.jsx)(d.FormFieldCheckbox,{label:(0,a.jsx)(i,{content:"expiresStaticOnly"}),name:"general[expiresStaticOnly]",description:(0,a.jsx)(i,{content:"expiresStaticOnlyDescription"}),checkedValue:"true",uncheckedValue:"false"},"general[expiresStaticOnly]-checkbox"):null]}),(0,a.jsx)(r.default,{section:"general",name:"headers",dependentFields:[(0,a.jsx)(p.default,{name:"general[headers]",label:null,description:(0,a.jsx)(x.default,{children:(0,a.jsx)(i,{content:"example",params:{example:(0,a.jsx)(i,{content:"headersExample"})}})})},"general[headers]-text")]}),(0,a.jsx)(d.FormFieldCheckbox,{name:"general[restrictFollowSymLinks]",label:(0,a.jsx)(i,{content:"restrictFollowSymLinks"}),description:(0,a.jsx)(i,{content:"restrictFollowSymLinksDescription"}),checkedValue:"true",uncheckedValue:"false"})]}),e.additionalSettings?(0,a.jsxs)(d.Section,{title:(0,a.jsx)(i,{content:"additional"}),children:[(0,a.jsx)(d.Paragraph,{children:(0,a.jsx)(i,{content:"additionalSettingsDescription"})}),(0,a.jsx)(p.default,{autoheight:!0,label:(0,a.jsx)(i,{content:"additionalSettings"}),name:"additional[additionalSettings]",size:"fill"}),(0,a.jsx)(p.default,{autoheight:!0,label:(0,a.jsx)(i,{content:"additionalSslSettings"}),name:"additional[additionalSslSettings]",size:"fill"})]}):null,e.nginx?(0,a.jsxs)(d.Section,{title:(0,a.jsx)(i,{content:"nginx"}),children:[(0,a.jsx)(d.FormFieldCheckbox,{name:"nginx[nginxProxyMode]",label:(0,a.jsx)(i,{content:"nginxProxyMode"}),description:(0,a.jsx)(i,{content:"nginxProxyModeDescription"}),checkedValue:"true",uncheckedValue:"false"}),(0,a.jsx)(d.FormFieldCheckbox,{name:"nginx[nginxTransparentMode]",label:(0,a.jsx)(i,{content:"nginxTransparentMode"}
5),description:(0,a.jsx)(i,{content:"nginxTransparentModeDescription"}),checkedValue:"false",uncheckedValue:"true"}),(0,a.jsx)(m.default,{name:"nginx[nginxServeStatic]",label:(0,a.jsx)(i,{content:"nginxServeStatic"}),checkedValue:"true",uncheckedValue:"false",dependentFields:[(0,a.jsx)(p.default,{title:null,description:(0,a.jsx)(i,{content:"nginxStaticExtensions"}),name:"nginx[nginxStaticExtensions]"},"nginx[nginxStaticExtensions]")]}),(0,a.jsx)(u.default,{label:(0,a.jsx)(i,{content:"nginxClientMaxBodySize"}),description:e.nginxClientMaxBodySize?(0,a.jsx)(i,{content:"nginxClientMaxBodySizeDescription"}):(0,a.jsx)(i,{content:"nginxClientMaxBodySizeDisabled"}),name:"nginx[nginxClientMaxBodySize]",disabled:!e.nginxClientMaxBodySize,multipliers:n.size}),(0,a.jsx)(m.default,{name:"nginx[nginxCacheEnabled]",label:(0,a.jsx)(i,{content:"nginxCacheEnabled"}),formFieldCheckboxProps:{"data-cy":"clear-cache-checkbox"},description:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i,{content:"nginxCacheEnabledDescription"}),(0,a.jsx)("br",{}),e&&(0,a.jsx)(d.Button,{icon:"clean",style:{marginTop:8},onClick:j,"data-cy":"clear-cache-button",tooltip:(0,a.jsx)(i,{content:"clearCacheHint",params:{website:l}}),children:(0,a.jsx)(i,{content:"clearCache"})})]}),checkedValue:"true",uncheckedValue:"false",dependentFields:[(0,a.jsx)(u.default,{label:(0,a.jsx)(i,{content:"nginxCacheSize"}),name:"nginx[nginxCache][nginxCacheSize]",multipliers:n.size},"nginx[nginxCacheSize]"),(0,a.jsx)(u.default,{label:(0,a.jsx)(i,{content:"nginxCacheTimeout"}),name:"nginx[nginxCache][nginxCacheTimeout]",multipliers:n.time},"nginx[nginxCacheTimeout]"),(0,a.jsx)(d.FormFieldText,{label:(0,a.jsx)(i,{content:"nginxCacheKey"}),name:"nginx[nginxCache][nginxCacheKey]",size:"xl"},"nginx[nginxCacheKey]"),(0,a.jsx)(p.default,{label:(0,a.jsx)(i,{content:"nginxCacheCookies"}),name:"nginx[nginxCache][nginxCacheCookies]"},"nginx[nginxCacheCookies]"),(0,a.jsx)(p.default,{label:(0,a.jsx)(i,{content:"nginxCacheBypassLocations"}),name:"nginx[nginxCache][nginxCacheBypassLocations]"},"nginx[nginxCacheBypassLocations]"),(0,a.jsxs)(d.FormField,{label:(0,a.jsx)(i,{content:"nginxCacheBypass"}),children:[(0,a.jsx)(d.FormFieldCheckbox,{label:(0,a.jsx)(i,{content:"nginxCacheBypassHeaderNocache"}),name:"nginx[nginxCache][nginxCacheBypassHeaderNocache]",checkedValue:"true",uncheckedValue:"false"}),(0,a.jsx)(d.FormFieldCheckbox,{label:(0,a.jsx)(i,{content:"nginxCacheBypassHeaderAuth"}),name:"nginx[nginxCache][nginxCacheBypassHeaderAuth]",checkedValue:"true",uncheckedValue:"false"}),(0,a.jsx)(d.FormFieldCheckbox,{label:(0,a.jsx)(i,{content:"nginxCacheBypassGetNocache"}),name:"nginx[nginxCache][nginxCacheBypassGetNocache]",checkedValue:"true",uncheckedValue:"false"})]},"nginx[nginxCacheBypass]"),(0,a.jsxs)(d.FormField,{label:(0,a.jsx)(i,{content:"nginxCacheUseStale"}),children:[(0,a.jsx)(d.FormFieldCheckbox,{label:(0,a.jsx)(i,{content:"nginxCacheUseStale5xx"}),name:"nginx[nginxCache][nginxCacheUseStale5xx]",checkedValue:"true",uncheckedValue:"false"}),(0,a.jsx)(d.FormFieldCheckbox,{label:(0,a.jsx)(i,{content:"nginxCacheUseStale4xx"}),name:"nginx[nginxCache][nginxCacheUseStale4xx]",checkedValue:"true",uncheckedValue:"false"}),(0,a.jsx)(d.FormFieldCheckbox,{label:(0,a.jsx)(i,{content:"nginxCacheUseStaleUpdating"}),name:"nginx[nginxCache][nginxCacheUseStaleUpdating]",checkedValue:"true",uncheckedValue:"false"})]},"nginx[nginxCacheUseStale]")]})]}):null,e.nginx&&e.additionalNginxSettings?(0,a.jsxs)(d.Section,{title:(0,a.jsx)(i,{content:"additionalNginx"}),children:[(0,a.jsx)(d.Paragraph,{children:(0,a.jsx)(i,{content:"additionalNginxSettingsDescription"})}),(0,a.jsx)(p.default,{autoheight:!0,name:"additionalNginx[additionalNginxSettings]",label:(0,a.jsx)(i,{content:"additionalNginxSettings"}),size:"fill"})]}):null]})};j.propTypes={features:i().shape({additionalSettings:i().bool,additionalSslSettings:i().bool,nginx:i().bool,additionalNginxSettings:i().bool,nginxClientMaxBodySize:i().bool,dynamicIpSecurity:i().bool}).isRequired,units:i().shape({time:i().object,size:i().object}).isRequired,domainId:i().number.isRequired,domainName:i().string.isRequired};const b=j},1803:(e,n,t)=>{t.r(n),t.d(n,{default:()=>c});var a=t(271),l=t(272),i=t.n(l),s=t(270),o=t(1800);
5const d=({dependentFields:e,maxCountToShow:n,description:t,formFieldCheckboxProps:l,...i})=>{const[d,c]=(0,s.useState)(null);return(0,s.jsx)(a.FormField,{...i,fullDescription:null,label:null,children:({getValue:r})=>{null===d&&c(r()===i.checkedValue);const x="function"==typeof t?t(d):t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.FormFieldCheckbox,{...i,...l,description:x,onChange:e=>c(e===i.checkedValue)}),(0,s.jsx)(o.default,{disabled:!d,hideDisabled:e.length>n,children:e})]})}})};d.propTypes={checkedValue:i().oneOfType([i().bool,i().string]),dependentFields:i().array,maxCountToShow:i().number,description:i().oneOfType([i().element,i().func]),formFieldCheckboxProps:i().shape({})},d.defaultProps={checkedValue:!0,dependentFields:[],maxCountToShow:5,description:void 0,formFieldCheckboxProps:{}};const c=d},1804:(e,n,t)=>{t.r(n),t.d(n,{default:()=>i});var a=t(271),l=t(270);const i=e=>(0,l.jsx)(a.FormFieldText,{size:"xl",rows:6,multiline:!0,...e})},1799:(e,n,t)=>{t.r(n),t.d(n,{default:()=>r});var a=t(271),l=t(272),i=t.n(l),s=t(1800),o=t(1797),d=t(270);const c=({dependentFields:e,hideFields:n,section:t,name:l,hasFullDescription:i,...c})=>{const r=(0,d.useContext)(o.TranslationContext);return(0,d.jsx)(a.FormFieldRadioButtons,{...c,label:(0,d.jsx)(r,{content:l}),name:`${t}[${l}_radio]`,fullDescription:i?(0,d.jsx)(r,{content:`${l}FullDescription`}):void 0,options:[{value:"off",label:(0,d.jsx)(r,{content:"settingDefault"})},{value:"custom",label:(0,d.jsx)(r,{content:"settingCustom"}),indentFields:[(0,d.jsx)(s.default,{children:e},`${t}[${l}_radio]-hidden-element`)]}]})};c.propTypes={dependentFields:i().arrayOf(i().element),hideFields:i().bool,section:i().string.isRequired,name:i().string.isRequired,hasFullDescription:i().bool},c.defaultProps={dependentFields:[],hideFields:!0,hasFullDescription:!0};const r=c},1800:(e,n,t)=>{t.r(n),t.d(n,{default:()=>o});var a=t(272),l=t.n(a),i=t(270);const s=({disabled:e,hideDisabled:n,children:t})=>e&&n?null:(0,i.jsx)("div",{className:"indent-box",children:i.default.Children.map(t,(n=>i.default.isValidElement(n)?i.default.cloneElement(n,{disabled:e}):n))});s.propTypes={disabled:l().bool,hideDisabled:l().bool,children:l().arrayOf(l().element)},s.defaultProps={disabled:!1,hideDisabled:!0,children:[]};const o=s},1798:(e,n,t)=>{t.r(n),t.d(n,{default:()=>p});var a=t(271),l=t(272),i=t.n(l),s=t(1797),o=t(1799),d=t(1801),c=t(1802),r=t(1803),x=t(1804),u=t(270);const m=({features:e,units:n})=>{const t=(0,u.useContext)(s.TranslationContext);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(a.Section,{id:"general",title:(0,u.jsx)(t,{content:"general"}),children:[(0,u.jsx)(a.FormFieldCheckbox,{name:"general[directoryBrowsing]",label:(0,u.jsx)(t,{content:"directoryBrowsing"}),checkedValue:"true",uncheckedValue:"false",description:(0,u.jsx)(t,{content:"directoryBrowsingDescription"})}),(0,u.jsx)(o.default,{section:"general",name:"documents",dependentFields:[(0,u.jsx)(x.default,{name:"general[documents]",label:null,description:(0,u.jsx)(d.default,{children:(0,u.jsx)(t,{content:"example",params:{example:(0,u.jsx)(t,{content:"documentsExample"})}})})},"general[documents]-text")]}),(0,u.jsx)(x.default,{name:"general[mimeTypes]",label:(0,u.jsx)(t,{content:"mimeTypes"}),fullDescription:(0,u.jsx)(t,{content:"mimeTypesFullDescription"}),description:(0,u.jsx)(d.default,{children:(0,u.jsx)(t,{content:"example",params:{example:(0,u.jsx)(t,{content:"mimeTypesExample"})}})})}),(0,u.jsx)(o.default,{section:"general",name:"deny",dependentFields:[(0,u.jsx)(x.default,{name:"general[deny]",label:null,description:(0,u.jsx)(d.default,{children:(0,u.jsx)(t,{content:"example",params:{example:(0,u.jsx)(t,{content:"denyExample"})}})})},"general[deny]-text"),(0,u.jsx)(a.Text,{children:(0,u.jsx)(t,{content:"allow"})},"general[allow]-allow"),(0,u.jsx)(x.default,{name:"general[allow]",label:null,description:(0,u.jsx)(d.default,{children:(0,u.jsx)(t,{content:"example",params:{example:(0,u.jsx)(t,{content:"allowExample"})}})})},"general[allow]-text")],hasFullDescription:!1}),(0,u.jsx)(o.default,{section:"general",name:"expires",dependentFields:[(0,u.jsx)(c.default,{label:null,name:"general[expires]",multipliers:n.time},"general[expires]-select")]}),(0,u.jsx)(o.default,{section:"general",name:"headers",dependentFields:[(0,u.jsx)(x.default,{name:"general[headers]",label:null,description:(0,u.jsx)(d.default,{children:(0,u.jsx)(t,{content:"example",params:{example:(0,u.jsx)(t,{content:"headersExample"})}})})},"general[headers]-text")]})]}),(0,u.jsxs)(a.Section,{title:(0,u.jsx)(t,{content:"securityTabDirectory"}),children:[(0,u.jsx)(a.FormFieldCheckbox,{name:"directory[allowAnonymous]",label:(0,u.jsx)(t,{content:"allowAnonymous"}),description:(0,u.jsx)(t,{content:"allowAnonymousDescription"}),checkedValue:"true",uncheckedValue:"false"}),(0,u.jsx)(a.FormFieldCheckbox,{name:"directory[allowWindows]",label:(0,u.jsx)(t,{content:"allowWindows"}),description:(0,u.jsx)(t,{content:"allowWindowsDescription"}),checkedValue:"true",uncheckedValue:"false"}),(0,u.jsx)(a.FormFieldCheckbox,{name:"directory[requireSsl]",label:(0,u.jsx)(t,{content:"requireSsl"}),description:(0,u.jsx)(t,{content:"requireSslDescription"}),checkedValue:"true",uncheckedValue:"false"})]}),e.dynamicIpSecurity?(0,u.jsxs)(a.Section,{title:(0,u.jsx)(t,{content:"dynamicIpSecurity"}),children:[(0,u.jsx)(r.default,{name:"dynamicIpSecurity[isDenyByConcurrentRequests]",label:(0,u.jsx)(t,{content:"dynamicIpSecurity"}
5),checkedValue:"true",uncheckedValue:"false",dependentFields:[(0,u.jsx)(a.FormFieldText,{name:"dynamicIpSecurity[maxConcurrentRequests]",label:(0,u.jsx)(t,{content:"maxConcurrentRequests"}),required:!0},"dynamicIpSecurity[maxConcurrentRequests]")]}),(0,u.jsx)(r.default,{name:"dynamicIpSecurity[isDenyByRequestRate]",label:(0,u.jsx)(t,{content:"isDenyByRequestRate"}),checkedValue:"true",uncheckedValue:"false",dependentFields:[(0,u.jsx)(a.FormFieldText,{name:"dynamicIpSecurity[maxRequests]",label:(0,u.jsx)(t,{content:"maxRequests"}),required:!0},"dynamicIpSecurity[maxRequests]"),(0,u.jsx)(a.FormFieldText,{name:"dynamicIpSecurity[requestInterval]",label:(0,u.jsx)(t,{content:"requestInterval"}),required:!0},"dynamicIpSecurity[requestInterval]")]})]}):null]})};m.propTypes={features:i().shape({additionalSettings:i().bool,additionalSslSettings:i().bool,nginx:i().bool,additionalNginxSettings:i().bool,nginxClientMaxBodySize:i().bool,dynamicIpSecurity:i().bool}).isRequired,units:i().shape({time:i().object,size:i().object}).isRequired};const p=m},1802:(e,n,t)=>{t.r(n),t.d(n,{default:()=>d});var a=t(271),l=t(272),i=t.n(l),s=t(270);const o=({multipliers:e,...n})=>{const[t,l]=(0,s.useState)(null),[i,o]=(0,s.useState)(null),d=(0,s.useMemo)((()=>Object.entries(e).map((([e,n])=>({name:n,value:e}))).sort(((e,n)=>n.value-e.value))),[e]),c=(e,n)=>parseInt(e,10)*parseInt(n,10);return(0,s.jsx)(a.FormField,{...n,children:({getId:e,getName:n,setValue:r,getValue:x,isDisabled:u})=>{if(null===i||null===t){const e=(e=>{const n=d.find((n=>e%n.value==0)).value;return[e/n,n]})(x());l(e[0]),o(e[1])}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.InputNumber,{id:`${e()}-value`,value:t,disabled:u(),onChange:e=>{l(e),r(c(e,i))},size:"sm"})," ",(0,s.jsx)("select",{id:`${e()}-multiplier`,value:i,disabled:u(),onChange:e=>{o(e.currentTarget.value),r(c(t,e.currentTarget.value))},children:d.map((e=>(0,s.jsx)("option",{value:e.value,children:e.name},`${n()}-option-${e.value}`)))})]})}})};o.propTypes={multipliers:i().object.isRequired,isMultiply:i().bool},o.defaultProps={isMultiply:!0};const d=o},1801:(e,n,t)=>{t.r(n),t.d(n,{default:()=>o});var a=t(272),l=t.n(a),i=t(270);const s=({children:e})=>(0,i.jsx)("div",{style:{whiteSpace:"pre-line"},children:e});s.propTypes={children:l().node},s.defaultProps={children:null};const o=s},1797:(e,n,t)=>{t.r(n),t.d(n,{TranslationContext:()=>m,WebServerSettings:()=>h,default:()=>g});var a=t(272),l=t.n(a),i=t(596),s=t(827),o=t(89),d=t(581),c=t(271),r=t(270),x=t(1798),u=t(1805);const m=r.default.createContext(null),p=o.Locale.getTranslate("components.buttons"),h=({domainId:e,domainName:n,values:t,features:a,units:l,isWindows:i})=>{const h=(0,d.useNavigate)(),g=i?o.Locale.getTranslate("components.forms.iis-settings"):o.Locale.getTranslate("components.forms.apache-settings");return(0,r.jsxs)(m.Provider,{value:g,children:[(0,r.jsx)(c.Paragraph,{children:(0,r.jsx)(g,{content:"formGeneralHint"})}),(0,r.jsx)(s.default,{values:t,submitButton:{id:"btn-send",name:"send",children:(0,r.jsx)(p,{content:"save"})},applyButton:{id:"btn-apply",name:"apply",children:(0,r.jsx)(p,{content:"apply"})},cancelButton:{id:"btn-cancel",name:"cancel",children:(0,r.jsx)(p,{content:"cancel"}),onClick:()=>h(`/smb/web/overview/id/${e}/type/domain`)},children:i?(0,r.jsx)(x.default,{features:a,units:l}):(0,r.jsx)(u.default,{features:a,units:l,domainId:e,domainName:n})})]})};h.propTypes={domainId:l().number.isRequired,domainName:l().string.isRequired,values:l().object.isRequired,isWindows:l().bool.isRequired,features:l().shape({additionalSettings:l().bool,additionalSslSettings:l().bool,nginx:l().bool,additionalNginxSettings:l().bool,nginxClientMaxBodySize:l().bool,dynamicIpSecurity:l().bool}).isRequired,units:l().shape({time:l().object,size:l().object}).isRequired};const g=(0,i.withPageLayout)(h)},1796:(e,n,t)=>{t.r(n),t.d(n,{default:()=>a.default});var a=t(1797)}}]); 6//# sourceMappingURL=web-server-settings.js.map?c1168ced146a8ca9a5f8
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.