diff --git a/src/main/java/run/halo/alist/controller/PolicyConfigValidationController.java b/src/main/java/run/halo/alist/controller/PolicyConfigValidationController.java index 94f9094..c82b5e9 100644 --- a/src/main/java/run/halo/alist/controller/PolicyConfigValidationController.java +++ b/src/main/java/run/halo/alist/controller/PolicyConfigValidationController.java @@ -42,7 +42,7 @@ public Mono validatePolicyConfig( // check if the current user has permissions return handler.getToken(properties) .flatMap(token -> { - var getMeUri = UriComponentsBuilder.fromHttpUrl(properties.getSite().toString()) + var getMeUri = UriComponentsBuilder.fromUriString(properties.getSite().toString()) .path("/api/me") .toUriString(); return handler.getWebClient().get().uri(getMeUri) diff --git a/src/main/java/run/halo/alist/endpoint/AListAttachmentHandler.java b/src/main/java/run/halo/alist/endpoint/AListAttachmentHandler.java index 217d2b5..a179f3f 100644 --- a/src/main/java/run/halo/alist/endpoint/AListAttachmentHandler.java +++ b/src/main/java/run/halo/alist/endpoint/AListAttachmentHandler.java @@ -267,13 +267,13 @@ public Mono getPermalink(Attachment attachment, Policy policy, ConfigMap co .flatMap(tuple2 -> { var token = tuple2.getT1(); var fileInfo = tuple2.getT2(); - var meUri = fromUriString( + var getMeUri = fromUriString( properties.getSite().toString()) .path("/api/me") .toUriString(); return webClient.get() - .uri(meUri) + .uri(getMeUri) .header(HttpHeaders.AUTHORIZATION, token) .retrieve() .bodyToMono(