feat: remove default configuration to prevend accidental override.

we used to have file neko.yaml with default configuration, but if we would add neko.yml the default configuration would still be read. so instead, default configuartion was moved to the sever itself and no file is distributed with it by defautl.
This commit is contained in:
Miroslav Šedivý
2026-08-15 15:36:06 +02:00
parent 6f31613d3b
commit baf21c1d97
7 changed files with 34 additions and 32 deletions
+2 -1
View File
@@ -61,7 +61,8 @@ docker run --rm -it \
-e "NEKO_WEBRTC_TCPMUX=${NEKO_MUX}" \
-e "NEKO_WEBRTC_NAT1TO1=${NEKO_NAT1TO1}" \
-e "NEKO_SESSION_FILE=/home/neko/sessions.txt" \
-v "${PWD}/runtime/$CONFIG:/etc/neko/neko.yml" \
-e "NEKO_SERVER_CORS=*" \
-v "${PWD}/runtime/$CONFIG:/etc/neko/neko.yaml" \
-e "NEKO_DEBUG=1" \
--shm-size=2G \
--security-opt seccomp=unconfined \
+2 -2
View File
@@ -60,7 +60,7 @@ func (Session) Init(cmd *cobra.Command) error {
return err
}
cmd.PersistentFlags().Bool("session.implicit_hosting", true, "allow implicit control switching")
cmd.PersistentFlags().Bool("session.implicit_hosting", false, "allow implicit control switching")
if err := viper.BindPFlag("session.implicit_hosting", cmd.PersistentFlags().Lookup("session.implicit_hosting")); err != nil {
return err
}
@@ -86,7 +86,7 @@ func (Session) Init(cmd *cobra.Command) error {
}
// cookie
cmd.PersistentFlags().Bool("session.cookie.enabled", true, "whether cookies authentication should be enabled")
cmd.PersistentFlags().Bool("session.cookie.enabled", false, "whether cookies authentication should be enabled")
if err := viper.BindPFlag("session.cookie.enabled", cmd.PersistentFlags().Lookup("session.cookie.enabled")); err != nil {
return err
}