Show More
@@ -159,11 +159,18 b' def detect_vcs_request(environ, backends' | |||
|
159 | 159 | # favicon often requested by browsers |
|
160 | 160 | 'favicon.ico', |
|
161 | 161 | |
|
162 | # static files no detection | |
|
163 | '_static++', | |
|
164 | ||
|
165 | # debug-toolbar | |
|
166 | '_debug_toolbar++', | |
|
167 | ||
|
162 | 168 | # e.g /_file_store/download |
|
163 | 169 | '_file_store++', |
|
164 | 170 | |
|
165 | 171 | # login |
|
166 |
" |
|
|
172 | f"{ADMIN_PREFIX}/login", | |
|
173 | f"{ADMIN_PREFIX}/logout", | |
|
167 | 174 | |
|
168 | 175 | # 2fa |
|
169 | 176 | f"{ADMIN_PREFIX}/check_2fa", |
@@ -178,12 +185,6 b' def detect_vcs_request(environ, backends' | |||
|
178 | 185 | # _admin/my_account is safe too |
|
179 | 186 | f'{ADMIN_PREFIX}/my_account++', |
|
180 | 187 | |
|
181 | # static files no detection | |
|
182 | '_static++', | |
|
183 | ||
|
184 | # debug-toolbar | |
|
185 | '_debug_toolbar++', | |
|
186 | ||
|
187 | 188 | # skip ops ping, status |
|
188 | 189 | f'{ADMIN_PREFIX}/ops/ping', |
|
189 | 190 | f'{ADMIN_PREFIX}/ops/status', |
@@ -193,11 +194,14 b' def detect_vcs_request(environ, backends' | |||
|
193 | 194 | |
|
194 | 195 | '++/repo_creating_check' |
|
195 | 196 | ] |
|
197 | ||
|
196 | 198 | path_info = get_path_info(environ) |
|
197 | 199 | path_url = path_info.lstrip('/') |
|
198 | 200 | req_method = environ.get('REQUEST_METHOD') |
|
199 | 201 | |
|
200 | 202 | for item in white_list: |
|
203 | item = item.lstrip('/') | |
|
204 | ||
|
201 | 205 | if item.endswith('++') and path_url.startswith(item[:-2]): |
|
202 | 206 | log.debug('path `%s` in whitelist (match:%s), skipping...', path_url, item) |
|
203 | 207 | return handler |
General Comments 0
You need to be logged in to leave comments.
Login now