diff --git a/frigate/http.py b/frigate/http.py
index ae688dcf9..815c700cc 100644
--- a/frigate/http.py
+++ b/frigate/http.py
@@ -710,7 +710,7 @@ def config_raw():
@bp.route("/config/save", methods=["POST"])
def config_save():
- save_option = request.headers.get("Save-Option")
+ save_option = request.args.get("save_option")
new_config = request.get_data().decode()
diff --git a/web/src/routes/Config.jsx b/web/src/routes/Config.jsx
index 9348cf04a..e80d8faf4 100644
--- a/web/src/routes/Config.jsx
+++ b/web/src/routes/Config.jsx
@@ -17,37 +17,14 @@ export default function Config() {
const [success, setSuccess] = useState();
const [error, setError] = useState();
- const onHandleSaveConfig = async (e) => {
+ const onHandleSaveConfig = async (e, save_option) => {
if (e) {
e.stopPropagation();
}
axios
- .post('config/save', window.editor.getValue(), {
- headers: { 'Content-Type': 'text/plain', 'Save-Option': 'restart' },
- })
- .then((response) => {
- if (response.status === 200) {
- setSuccess(response.data);
- }
- })
- .catch((error) => {
- if (error.response) {
- setError(error.response.data.message);
- } else {
- setError(error.message);
- }
- });
- };
-
- const onHandleSaveConfigOnly = async (e) => {
- if (e) {
- e.stopPropagation();
- }
-
- axios
- .post('config/save', window.editor.getValue(), {
- headers: { 'Content-Type': 'text/plain', 'Save-Option': 'saveonly' },
+ .post('config/save?save_option='+save_option, window.editor.getValue(), {
+ headers: { 'Content-Type': 'text/plain' },
})
.then((response) => {
if (response.status === 200) {
@@ -120,10 +97,10 @@ export default function Config() {
-