(basepath)
| 117 | } |
| 118 | |
| 119 | handleBasepath(basepath) { |
| 120 | if (!basepath) { |
| 121 | return ''; |
| 122 | } |
| 123 | if (basepath === '/') { |
| 124 | return ''; |
| 125 | } |
| 126 | if (basepath[0] !== '/') { |
| 127 | basepath = '/' + basepath; |
| 128 | } |
| 129 | if (basepath[basepath.length - 1] === '/') { |
| 130 | basepath = basepath.substr(0, basepath.length - 1); |
| 131 | } |
| 132 | if (!/^\/[a-zA-Z0-9\-\/\._]+$/.test(basepath)) { |
| 133 | return false; |
| 134 | } |
| 135 | return basepath; |
| 136 | } |
| 137 | |
| 138 | verifyDomain(domain) { |
| 139 | if (!domain) { |