Merge branch 'develop' of github.com:fuomag9/caddy-proxy-manager into develop
This commit is contained in:
@@ -155,6 +155,14 @@ function parseOptionalJson(value: string | null | undefined) {
|
||||
|
||||
function mergeDeep(target: Record<string, unknown>, source: Record<string, unknown>) {
|
||||
for (const [key, value] of Object.entries(source)) {
|
||||
// Block prototype-polluting keys
|
||||
if (
|
||||
key === "__proto__" ||
|
||||
key === "constructor" ||
|
||||
key === "prototype"
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
const existing = target[key];
|
||||
if (isPlainObject(existing) && isPlainObject(value)) {
|
||||
mergeDeep(existing, value);
|
||||
|
||||
Reference in New Issue
Block a user