mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-19 05:34:27 +05:00
script: add more default trusted_clients to moonraker.conf template
the previous method of adding the host network range was too unreliable in some cases and didn't cover some popular usecases
This commit is contained in:
@@ -9,10 +9,14 @@ klippy_uds_address: %UDS%
|
||||
|
||||
[authorization]
|
||||
trusted_clients:
|
||||
127.0.0.1
|
||||
%LAN%
|
||||
::1/128
|
||||
10.0.0.0/8
|
||||
127.0.0.0/8
|
||||
169.254.0.0/16
|
||||
172.16.0.0/12
|
||||
192.168.0.0/16
|
||||
FE80::/10
|
||||
::1/128
|
||||
cors_domains:
|
||||
*.lan
|
||||
*.local
|
||||
|
||||
@@ -277,7 +277,13 @@ create_moonraker_conf(){
|
||||
sed -i "s|%LOG%|$LOG_PATH|" $MR_CONF
|
||||
sed -i "s|%MR_DB%|$MR_DB|" $MR_CONF
|
||||
sed -i "s|%UDS%|$KLIPPY_UDS|" $MR_CONF
|
||||
sed -i "s|%LAN%|$LAN|" $MR_CONF
|
||||
# if host ip is not in the default ip ranges, replace placeholder
|
||||
# otherwise remove placeholder from config
|
||||
if ! grep $LAN $MR_CONF; then
|
||||
sed -i "s|%LAN%|$LAN|" $MR_CONF
|
||||
else
|
||||
sed -i "/%LAN%/d" $MR_CONF
|
||||
fi
|
||||
sed -i "s|%USER%|${USER}|g" $MR_CONF
|
||||
ok_msg "moonraker.conf created!"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user