File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
src/main/java/ru/mystamps/web Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,7 @@ private Url() {
49
49
}
50
50
51
51
public static Map <String , String > asMap (boolean production ) {
52
- boolean serveContentFromSingleHost = !production ;
53
-
54
- // Not all URLs are listed here but only those that are being used on views
52
+ // Not all URLs are exported here but only those that are being used on views
55
53
Map <String , String > map = new HashMap <>();
56
54
AccountUrl .exposeUrlsToView (map );
57
55
CategoryUrl .exposeUrlsToView (map );
@@ -69,13 +67,9 @@ public static Map<String, String> asMap(boolean production) {
69
67
70
68
map .put ("PUBLIC_URL" , production ? SiteUrl .PUBLIC_URL : SiteUrl .SITE );
71
69
72
- if (serveContentFromSingleHost ) {
73
- ImageUrl .exposeResourcesToView (map , null );
74
- ResourceUrl .exposeResourcesToView (map , null );
75
- } else {
76
- ImageUrl .exposeResourcesToView (map , ResourceUrl .STATIC_RESOURCES_URL );
77
- ResourceUrl .exposeResourcesToView (map , ResourceUrl .STATIC_RESOURCES_URL );
78
- }
70
+ String resourcesHost = production ? ResourceUrl .STATIC_RESOURCES_URL : null ;
71
+ ImageUrl .exposeResourcesToView (map , resourcesHost );
72
+ ResourceUrl .exposeResourcesToView (map , resourcesHost );
79
73
80
74
return map ;
81
75
}
You can’t perform that action at this time.
0 commit comments