Fix deep recursion glitch

Signed-off-by: James P. Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
James P. Ketrenos 2023-01-20 19:20:51 -08:00
parent 266ce00d33
commit e54fc968e6
3 changed files with 23 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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;