1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-01 13:48:56 +08:00

NOISSUE - Update nginx version (#748)

* Update version of the Nginx image

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Add undefined check for HTTP and WS

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
This commit is contained in:
Dušan Borovčanin 2019-05-16 11:59:23 +02:00 committed by Drasko DRASKOVIC
parent 5202d734c9
commit 9d30006d31
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ volumes:
services: services:
nginx: nginx:
image: nginx:1.14.2 image: nginx:1.16.0-alpine
container_name: mainflux-nginx container_name: mainflux-nginx
restart: on-failure restart: on-failure
volumes: volumes:

View File

@ -133,12 +133,12 @@ function setKey(r) {
} }
var auth = r.headersIn['Authorization']; var auth = r.headersIn['Authorization'];
if (auth.length && auth != clientKey) { if (auth && auth.length && auth != clientKey) {
r.error('Authorization header does not match certificate'); r.error('Authorization header does not match certificate');
return ''; return '';
} }
if (r.uri.startsWith('/ws') && !auth.length) { if (r.uri.startsWith('/ws') && (!auth || !auth.length)) {
var a; var a;
for (a in r.args) { for (a in r.args) {
if (a == 'authorization' && r.args[a] === clientKey) { if (a == 'authorization' && r.args[a] === clientKey) {