mirror of
				https://github.com/Yidadaa/ChatGPT-Next-Web.git
				synced 2025-11-04 16:57:27 +08:00 
			
		
		
		
	fix: webdav check httpcode list
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
This commit is contained in:
		@@ -20,8 +20,15 @@ export function createWebDavClient(store: SyncStore) {
 | 
				
			|||||||
          headers: this.headers(),
 | 
					          headers: this.headers(),
 | 
				
			||||||
          proxyUrl,
 | 
					          proxyUrl,
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        console.log("[WebDav] check", res.status, res.statusText);
 | 
					        const success = [201, 200, 404, 405, 301, 302, 307, 308].includes(
 | 
				
			||||||
        return [201, 200, 404, 301, 302, 307, 308].includes(res.status);
 | 
					          res.status,
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        console.log(
 | 
				
			||||||
 | 
					          `[WebDav] check ${success ? "success" : "failed"}, ${res.status} ${
 | 
				
			||||||
 | 
					            res.statusText
 | 
				
			||||||
 | 
					          }`,
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					        return success;
 | 
				
			||||||
      } catch (e) {
 | 
					      } catch (e) {
 | 
				
			||||||
        console.error("[WebDav] failed to check", e);
 | 
					        console.error("[WebDav] failed to check", e);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user