|
@@ -5,6 +5,7 @@ import com.aliyuncs.sts.model.v20150401.AssumeRoleResponse;
|
|
|
import com.qmth.ops.aliyun.config.SlsConfig;
|
|
|
import com.sun.deploy.net.URLEncoder;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.reactive.function.client.WebClient;
|
|
@@ -28,6 +29,9 @@ public class SlsService {
|
|
|
@Autowired
|
|
|
private SlsConfig config;
|
|
|
|
|
|
+ @Value("${ops.host}")
|
|
|
+ private String hostUrl;
|
|
|
+
|
|
|
public List<SlsProject> getProject() {
|
|
|
return projectList;
|
|
|
}
|
|
@@ -49,8 +53,8 @@ public class SlsService {
|
|
|
}
|
|
|
|
|
|
private Mono<String> getSignUrl(Mono<String> token, String project, String store) {
|
|
|
- return token.flatMap(t -> Mono.just(MessageFormat.format(config.getSignUrl(), param(config.getRedirectUrl()),
|
|
|
- param(MessageFormat.format(config.getQueryUrl(), project, store)), param(t))));
|
|
|
+ return token.flatMap(t -> Mono.just(MessageFormat
|
|
|
+ .format(config.getSignUrl(), param(hostUrl), param(MessageFormat.format(config.getQueryUrl(), project, store)), param(t))));
|
|
|
}
|
|
|
|
|
|
private static String param(String content) {
|