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:
parent
5202d734c9
commit
9d30006d31
@ -21,7 +21,7 @@ volumes:
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:1.14.2
|
||||
image: nginx:1.16.0-alpine
|
||||
container_name: mainflux-nginx
|
||||
restart: on-failure
|
||||
volumes:
|
||||
|
@ -133,12 +133,12 @@ function setKey(r) {
|
||||
}
|
||||
|
||||
var auth = r.headersIn['Authorization'];
|
||||
if (auth.length && auth != clientKey) {
|
||||
if (auth && auth.length && auth != clientKey) {
|
||||
r.error('Authorization header does not match certificate');
|
||||
return '';
|
||||
}
|
||||
|
||||
if (r.uri.startsWith('/ws') && !auth.length) {
|
||||
if (r.uri.startsWith('/ws') && (!auth || !auth.length)) {
|
||||
var a;
|
||||
for (a in r.args) {
|
||||
if (a == 'authorization' && r.args[a] === clientKey) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user