Skip to content

Commit 5fb7460

Browse files
committed
Serve static content from same domain.
Required for properly fix #72 but this changes reopens #73
1 parent c932168 commit 5fb7460

File tree

3 files changed

+6
-31
lines changed

3 files changed

+6
-31
lines changed

src/main/config/nginx/mystamps-static.conf

-21
This file was deleted.

src/main/config/nginx/mystamps.conf

+5-9
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,21 @@ map $http_accept_language $lang {
44
}
55

66
server {
7-
listen 80 default_server;
7+
listen 443 default_server;
88
server_name my-stamps.ru www.my-stamps.ru;
99
server_tokens off;
1010
error_log /data/logs/nginx.log notice;
1111

12+
ssl on;
13+
ssl_certificate /etc/ssl/my-stamps.ru.crt;
14+
ssl_certificate_key /etc/ssl/my-stamps.ru.key;
15+
1216
location @maintenance {
1317
root /data/nginx;
1418
add_header Retry-After 180 always; # 3 min
1519
try_files /503.$lang.html =502;
1620
}
1721

18-
location /image/ {
19-
return 301 http://stamps.filezz.ru$request_uri;
20-
}
21-
22-
location ~* \.(ico|css|js)$ {
23-
return 301 http://stamps.filezz.ru$request_uri;
24-
}
25-
2622
location / {
2723
error_page 502 =503 @maintenance;
2824
proxy_set_header X-Forwarded-For $remote_addr;

src/main/java/ru/mystamps/web/Url.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
public final class Url {
3131
public static final String PUBLIC_URL = "https://my-stamps.ru";
32-
public static final String STATIC_RESOURCES_URL = "http://stamps.filezz.ru";
32+
public static final String STATIC_RESOURCES_URL = PUBLIC_URL;
3333

3434
// defined at pom.xml (and used by functional tests only)
3535
public static final String SITE = "http://127.0.0.1:8080";

0 commit comments

Comments
 (0)