Skip to content

Commit

Permalink
DOCKER_ADDRESS自动替换 (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
power721 authored Jan 19, 2025
1 parent d43c0e0 commit dc1559c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ public String node(String file) throws IOException {
String quarkCookie = panAccountRepository.findByTypeAndMasterTrue(DriverType.QUARK).map(PanAccount::getCookie).orElse("");
json = json.replace("QUARK_COOKIE", quarkCookie);

String address = readHostAddress();
json = json.replace("DOCKER_ADDRESS", address);
json = json.replace("ATV_ADDRESS", address);

if ("index.config.js".equals(file)) {
return json;
} else if ("index.config.js.md5".equals(file)) {
Expand Down Expand Up @@ -411,6 +415,9 @@ private String replaceOpen(String json) {
json = json.replace("阿里token", ali);
String token = siteRepository.findById(1).map(Site::getToken).orElse("");
json = json.replace("ALIST_TOKEN", token);
String address = readHostAddress();
json = json.replace("DOCKER_ADDRESS", address);
json = json.replace("ATV_ADDRESS", address);
return json;
}

Expand Down

0 comments on commit dc1559c

Please sign in to comment.