mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-05 04:10:10 +00:00
Compare commits
1 Commits
2a98f98272
...
v2.12.3
Author | SHA1 | Date | |
---|---|---|---|
|
c5a319cb20 |
@@ -12,11 +12,7 @@ Model.knex(db);
|
|||||||
|
|
||||||
const boolFields = [
|
const boolFields = [
|
||||||
'is_deleted',
|
'is_deleted',
|
||||||
'ssl_forced',
|
|
||||||
'http2_support',
|
|
||||||
'enabled',
|
'enabled',
|
||||||
'hsts_enabled',
|
|
||||||
'hsts_subdomains',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
class DeadHost extends Model {
|
class DeadHost extends Model {
|
||||||
|
@@ -8,8 +8,8 @@ const now = require('./now_helper');
|
|||||||
Model.knex(db);
|
Model.knex(db);
|
||||||
|
|
||||||
const boolFields = [
|
const boolFields = [
|
||||||
'is_deleted',
|
|
||||||
'enabled',
|
'enabled',
|
||||||
|
'is_deleted',
|
||||||
'tcp_forwarding',
|
'tcp_forwarding',
|
||||||
'udp_forwarding',
|
'udp_forwarding',
|
||||||
];
|
];
|
||||||
|
@@ -22,7 +22,8 @@
|
|||||||
"enabled",
|
"enabled",
|
||||||
"locations",
|
"locations",
|
||||||
"hsts_enabled",
|
"hsts_enabled",
|
||||||
"hsts_subdomains"
|
"hsts_subdomains",
|
||||||
|
"certificate"
|
||||||
],
|
],
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@@ -9,15 +9,6 @@
|
|||||||
"url": "http://127.0.0.1:81/api"
|
"url": "http://127.0.0.1:81/api"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"components": {
|
|
||||||
"securitySchemes": {
|
|
||||||
"bearerAuth": {
|
|
||||||
"type": "http",
|
|
||||||
"scheme": "bearer",
|
|
||||||
"bearerFormat": "JWT"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"/": {
|
"/": {
|
||||||
"get": {
|
"get": {
|
||||||
|
@@ -1,54 +0,0 @@
|
|||||||
#!/command/with-contenv bash
|
|
||||||
|
|
||||||
set -e # Exit immediately if a command exits with a non-zero status.
|
|
||||||
|
|
||||||
function set_properties() {
|
|
||||||
sed -i "s,^$1=.*,$1=$2,g" "${3}"
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Deploy Crowdsec Openresty Bouncer.."
|
|
||||||
if [ -n "${CROWDSEC_OPENRESTY_BOUNCER}" ]; then
|
|
||||||
while IFS= read -r line
|
|
||||||
do
|
|
||||||
if ! [[ "$line" != "^#" ]] || [[ "$line" != "^\n" ]]; then
|
|
||||||
name=$(echo "$line" | cut -d "=" -f1)
|
|
||||||
value=$(echo "$line" | cut -d "=" -f2)
|
|
||||||
if grep -q "${name}" /defaults/crowdsec/crowdsec-openresty-bouncer.conf ; then
|
|
||||||
set_properties "${name}" "${value}" "/defaults/crowdsec/crowdsec-openresty-bouncer.conf"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done <<< "${CROWDSEC_OPENRESTY_BOUNCER}"
|
|
||||||
else
|
|
||||||
mkdir -p /data/crowdsec/templates
|
|
||||||
sed -i 's|/defaults/crowdsec|/data/crowdsec|' /etc/nginx/conf.d/crowdsec_openresty.conf
|
|
||||||
|
|
||||||
if [ -f /data/crowdsec/crowdsec-openresty-bouncer.conf ]; then
|
|
||||||
echo "Patch crowdsec-openresty-bouncer.conf .."
|
|
||||||
sed "s/=.*//g" /data/crowdsec/crowdsec-openresty-bouncer.conf > /tmp/crowdsec.conf.raw
|
|
||||||
sed "s/=.*//g" /defaults/crowdsec/crowdsec-openresty-bouncer.conf > /tmp/crowdsec-openresty-bouncer.conf.raw
|
|
||||||
if grep -vf /tmp/crowdsec.conf.raw /tmp/crowdsec-openresty-bouncer.conf.raw ; then
|
|
||||||
grep -vf /tmp/crowdsec.conf.raw /tmp/crowdsec-openresty-bouncer.conf.raw > /tmp/config.newvals
|
|
||||||
cp /data/crowdsec/crowdsec-openresty-bouncer.conf /data/crowdsec/crowdsec-openresty-bouncer.conf.bak
|
|
||||||
grep -f /tmp/config.newvals /defaults/crowdsec/crowdsec-openresty-bouncer.conf >> /data/crowdsec/crowdsec-openresty-bouncer.conf
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Deploy new crowdsec-openresty-bouncer.conf .."
|
|
||||||
cp /defaults/crowdsec/crowdsec-openresty-bouncer.conf /data/crowdsec/crowdsec-openresty-bouncer.conf
|
|
||||||
fi
|
|
||||||
#Make sure the config location is where we get the config from instead of /default/
|
|
||||||
sed -i 's|/defaults/crowdsec|/data/crowdsec|' /data/crowdsec/crowdsec-openresty-bouncer.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#Make sure we only copy files that don't exist in /data/crowdsec.
|
|
||||||
if [ -d "/data/crowdsec/templates" ]; then
|
|
||||||
echo "Deploy Crowdsec Templates .."
|
|
||||||
cd /defaults/crowdsec/templates/
|
|
||||||
for file in *.html
|
|
||||||
do
|
|
||||||
if [ ! -e "/data/crowdsec/templates/${file}" ]
|
|
||||||
then
|
|
||||||
cp -r "/defaults/crowdsec/templates/${file}" "/data/crowdsec/templates/"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
@@ -1 +0,0 @@
|
|||||||
oneshot
|
|
@@ -1,2 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
/etc/s6-overlay/s6-rc.d/cs-crowdsec-bouncer/script.sh
|
|
Reference in New Issue
Block a user