diff --git a/client/src/App.tsx b/client/src/App.tsx index a71f3c4..498758d 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -8,6 +8,7 @@ import { Routes, useParams } from "react-router-dom"; +import equal from "fast-deep-equal"; import './App.css'; const base = process.env.PUBLIC_URL; /* /identities -- set in .env */ @@ -404,9 +405,12 @@ const App = () => { } for (let key in identities) { if (identities[key].identityId === identity.identityId) { - if (identities[key] !== identity) { - /* Inherit all fields from prior identity, while - * also keeping the same reference pointer */ + let same = true; + [ 'displayName', 'firstName', 'lastName', 'middleName' ] + .forEach((field: string) => { + same = same && (identities[key] as any)[field] === (identity as any)[field]; + }); + if (!same) { identities[key] = { ...identity, relatedFaces: identities[key].relatedFaces diff --git a/docker-compose.yml b/docker-compose.yml index ed4c898..2b7967e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,10 +17,10 @@ services: # - db restart: always ports: - - ${PORT}:80 # nginx -> server/app.js express app + - ${PORT}:443 # nginx -> server/app.js express app # - 127.0.0.1:${SHELL_PORT}:4200 # shellinabox volumes: - - /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys + - /etc/letsencrypt:/etc/letsencrypt:ro # Use host web keys - ${PICTURES}:/pictures - ${PWD}/db:/website/db - ${PWD}/config/local.json:/website/config/local.json diff --git a/server/nginx.conf b/server/nginx.conf index 40aefd5..eef3b08 100644 --- a/server/nginx.conf +++ b/server/nginx.conf @@ -1,4 +1,18 @@ server { + listen 80 default_server; + listen [::]:80 default_server; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + client_max_body_size 5g; + + ssl on; + + ssl_certificate /etc/letsencrypt/live/ketrenos.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/ketrenos.com/privkey.pem; + root /website; index index.html;