aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-02-19 15:58:37 +0300
committerGravatar Vitaly Takmazov2024-02-19 15:58:37 +0300
commita5ff7b6b96c6ce40c87d48bc2a92fb893a3de52d (patch)
tree5c07dddd9185732e5691f677d341f573956803da
parent2feb692a62d559dec0a116726a05eb04bbd7dddc (diff)
Revert "site: use base url in page layout"
This reverts commit aee5780150a7347838e113b17312f3636c2701f2.
-rw-r--r--src/main/java/com/juick/www/WebApp.java9
-rw-r--r--src/main/resources/templates/layouts/default.html1
2 files changed, 0 insertions, 10 deletions
diff --git a/src/main/java/com/juick/www/WebApp.java b/src/main/java/com/juick/www/WebApp.java
index 74e0d822..a7c5eb8b 100644
--- a/src/main/java/com/juick/www/WebApp.java
+++ b/src/main/java/com/juick/www/WebApp.java
@@ -42,8 +42,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.resource.ResourceUrlProvider;
-import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
-import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
/**
@@ -60,8 +58,6 @@ public class WebApp {
private PebbleEngine pebbleEngine;
@Value("${img_url:http://localhost:8080/i/}")
private String baseImagesUri;
- @Value("${web_domain:localhost}")
- private String webDomain;
UriComponentsBuilder avatarBuilder;
@PostConstruct
@@ -110,11 +106,6 @@ public class WebApp {
return avatarBuilder.build().toUriString();
}
- public String getBaseUrl() {
- UriComponents builder = ServletUriComponentsBuilder.fromCurrentRequest().replacePath("/").replaceQuery("").build();
- return builder.toUriString();
- }
-
public Optional<String> renderPlaintext(String body, String messageUrl) {
PebbleTemplate noteTemplate = pebbleEngine.getTemplate("email/plaintext");
Map<String, Object> context = new HashMap<>();
diff --git a/src/main/resources/templates/layouts/default.html b/src/main/resources/templates/layouts/default.html
index 4023805a..917d706c 100644
--- a/src/main/resources/templates/layouts/default.html
+++ b/src/main/resources/templates/layouts/default.html
@@ -4,7 +4,6 @@
<head>
<meta charset="utf-8" />
<meta name="ermp-site-verification" value="6714D81C-9EEF-4283-A726-166680B6ABC8" />
- <base href="{{ beans.webApp.baseUrl }}" />
<script type="text/javascript" src="{{ beans.webApp.scriptsUrl }}"></script>
<link rel="stylesheet" type="text/css" href="{{ beans.webApp.styleUrl }}" />
{% block headers %}