File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,9 @@ type Configuration struct {
319
319
// is only required by users running Wings without SSL certificates and using internal IP
320
320
// addresses in order to connect. Most users should NOT enable this setting.
321
321
AllowCORSPrivateNetwork bool `json:"allow_cors_private_network" yaml:"allow_cors_private_network"`
322
+
323
+ // IgnorePanelConfigUpdates causes confiuration updates that are sent by the panel to be ignored.
324
+ IgnorePanelConfigUpdates bool `json:"ignore_panel_config_updates" yaml:"ignore_panel_config_updates"`
322
325
}
323
326
324
327
// NewAtPath creates a new struct and set the path where it should be stored.
Original file line number Diff line number Diff line change @@ -113,9 +113,21 @@ func postCreateServer(c *gin.Context) {
113
113
c .Status (http .StatusAccepted )
114
114
}
115
115
116
+ type postUpdateConfigurationResponse struct {
117
+ Applied bool `json:"applied"`
118
+ }
119
+
116
120
// Updates the running configuration for this Wings instance.
117
121
func postUpdateConfiguration (c * gin.Context ) {
118
122
cfg := config .Get ()
123
+
124
+ if cfg .IgnorePanelConfigUpdates {
125
+ c .JSON (http .StatusOK , postUpdateConfigurationResponse {
126
+ Applied : false ,
127
+ })
128
+ return
129
+ }
130
+
119
131
if err := c .BindJSON (& cfg ); err != nil {
120
132
return
121
133
}
@@ -139,5 +151,7 @@ func postUpdateConfiguration(c *gin.Context) {
139
151
// Since we wrote it to the disk successfully now update the global configuration
140
152
// state to use this new configuration struct.
141
153
config .Set (cfg )
142
- c .Status (http .StatusNoContent )
154
+ c .JSON (http .StatusOK , postUpdateConfigurationResponse {
155
+ Applied : true ,
156
+ })
143
157
}
You can’t perform that action at this time.
0 commit comments