Skip to content

Commit

Permalink
fixed bugs in sandbox
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
  • Loading branch information
thjaeckle committed Apr 27, 2018
1 parent 186cc21 commit e8bfdea
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 36 deletions.
36 changes: 6 additions & 30 deletions docker/nginx.conf
Expand Up @@ -67,36 +67,8 @@ http {

# status
location /status {
proxy_pass http://gateway:8080/status;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-User $remote_user;
}

# stats
location /stats {
proxy_pass http://gateway:8080/stats;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-User $remote_user;
}

# devops
location /devops {
proxy_pass http://gateway:8080/devops;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-User $remote_user;
}
include nginx-cors.conf;

# status
location /status {
proxy_pass http://gateway:8080/status;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
Expand All @@ -107,6 +79,8 @@ http {

# stats
location /stats {
include nginx-cors.conf;

proxy_pass http://gateway:8080/stats;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
Expand All @@ -117,8 +91,10 @@ http {

# devops
location /devops {
include nginx-cors.conf;

proxy_pass http://gateway:8080/devops;
proxy_http_version 1.1;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
10 changes: 5 additions & 5 deletions docker/sandbox/html/index.html
Expand Up @@ -195,14 +195,14 @@ <h2>Statistics</h2>
</p>`).appendTo("#health-content");

let items = [];
$.each(data.roles, function (key, val) {
if (keysToIgnore.includes(key)) {
$.each(data.children, function (idx, child) {
if (keysToIgnore.includes(child.label)) {
// ignore
} else {
items.push(`<li>
<span class="health-key">${key}:</span>
<span class="health ${calcHealthStatusClass(val.status)}"></span>
<span class="health-status">${val.status}</span>
<span class="health-key">${child.label}:</span>
<span class="health ${calcHealthStatusClass(child.status)}"></span>
<span class="health-status">${child.status}</span>
</li>`);
}
});
Expand Down
6 changes: 6 additions & 0 deletions docker/sandbox/nginx.conf
Expand Up @@ -164,6 +164,8 @@ http {

# status
location /status {
include nginx-cors.conf;

proxy_pass http://gateway:8080/status;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
Expand All @@ -174,6 +176,8 @@ http {

# stats
location /stats {
include nginx-cors.conf;

proxy_pass http://gateway:8080/stats;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
Expand All @@ -184,6 +188,8 @@ http {

# devops
location /devops {
include nginx-cors.conf;

auth_basic "DevOps Authentication required";
auth_basic_user_file nginx-devops.htpasswd;

Expand Down
Expand Up @@ -93,7 +93,7 @@ ditto {
client.init-timeout = 5s

health-check {
enabled = false
enabled = true
enabled = ${?HEALTH_CHECK_ENABLED} # may be overridden with this environment variable
interval = 60s

Expand Down

0 comments on commit e8bfdea

Please sign in to comment.