Skip to content

Commit

Permalink
Merge branch 'release/v1.26.1-8'
Browse files Browse the repository at this point in the history
  • Loading branch information
kahoona77 authored and cesmarvin committed Sep 4, 2024
2 parents 6ce5b32 + 7cfb19d commit 02018ae
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.26.1-8] - 2024-09-04
### Fixed
- Fix problems with content security policies (CSP) caused by whitelabeling

## [v1.26.1-7] - 2024-08-29
### Changed
- Update warp menu to v2.0.0 (#104)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ RUN wget --progress=bar:force:noscroll -O /tmp/theme.zip https://github.com/clou
FROM registry.cloudogu.com/official/base:3.20.2-1
LABEL maintainer="[email protected]" \
NAME="official/nginx" \
VERSION="1.26.1-7"
VERSION="1.26.1-8"

ENV CES_MAINTENANCE_MODE=false \
# Used in template to invalidate caches - do not remove. The release script will auto update this line
VERSION="1.26.1-7"
VERSION="1.26.1-8"

RUN set -x -o errexit \
&& set -o nounset \
Expand Down
2 changes: 1 addition & 1 deletion dogu.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Name": "official/nginx",
"Version": "1.26.1-7",
"Version": "1.26.1-8",
"DisplayName": "Nginx",
"Description": "Nginx WebServer.",
"Logo": "https://cloudogu.com/images/dogus/nginx.png",
Expand Down
1 change: 1 addition & 0 deletions resources/etc/ces-confd/templates/app.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ server {
include /etc/nginx/include.d/ssl.conf;
include /etc/nginx/include.d/errors.conf;
include /etc/nginx/include.d/warp.conf;
include /etc/nginx/include.d/whitelabel.conf;
include /etc/nginx/include.d/robots.conf;
include /etc/nginx/app.conf.d/*.conf;
Expand Down
4 changes: 2 additions & 2 deletions resources/etc/nginx/include.d/subfilters.conf.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# warp menu
set $scripts '<script type="text/javascript" src="/warpmenu/add-warp-menu.js"></script>';
set $scripts '<script type="text/javascript" src="/warpmenu/add-warp-menu.js?nginx={{ .Env.Get "VERSION"}}"></script>';

# Include google analytics scripts if a tracking id is set
{{ if .Config.Exists "google_tracking_id" }}
Expand All @@ -12,7 +12,7 @@ set $scripts '$scripts </body>';


# html-head filters
set $whitelabelClassScript '<script type="text/javascript">document.documentElement.classList.add("ces-whitelabel");</script>';
set $whitelabelClassScript '<script type="text/javascript" src="/whitelabeljs/add-whitelabeling.js?nginx={{ .Env.Get "VERSION"}}"></script>';
set $whitelabelStyles '<link rel="stylesheet" type="text/css" href="/styles/default.css?nginx={{ .Env.Get "VERSION" }}"><link rel="stylesheet" type="text/css" href="/whitelabeling/main.css">';

# add closing head-tag
Expand Down
4 changes: 4 additions & 0 deletions resources/etc/nginx/include.d/whitelabel.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# whitelabel js
location /whitelabeljs {
root /var/www/html;
}
8 changes: 3 additions & 5 deletions resources/var/www/html/warpmenu/add-warp-menu.js.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ const addWarpMenu = function(){
// Update this version whenever warp menu is updated
warpScript.src = "/warp/warp.js?nginx={{ .Env.Get "VERSION"}}";
const urlScript = document.createElement("script");
// This variable is used inside the warp menu script
// Update this version whenever warp menu is updated
urlScript.innerHTML = 'const cesWarpMenuWarpCssUrl = "/warp/warp.css?nginx={{ .Env.Get "VERSION"}}";';
const firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(urlScript, firstScriptTag);
firstScriptTag.parentNode.insertBefore(warpScript, firstScriptTag);
}

// This variable is used inside the warp menu script
// Update this version whenever warp menu is updated
const cesWarpMenuWarpCssUrl = "/warp/warp.css?nginx={{ .Env.Get "VERSION"}}";
addWarpMenu();
1 change: 1 addition & 0 deletions resources/var/www/html/whitelabeljs/add-whitelabeling.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.documentElement.classList.add("ces-whitelabel");

0 comments on commit 02018ae

Please sign in to comment.