From c013366b27be56088b497b6cf8cce321d9c3d0fb Mon Sep 17 00:00:00 2001 From: zhongwencool Date: Tue, 21 May 2024 16:05:47 +0800 Subject: [PATCH] chore: upgrade minirest to 1.4.1 to ignore 415 code check --- changes/ce/fix-13078.en.md | 1 + mix.exs | 2 +- rebar.config | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changes/ce/fix-13078.en.md diff --git a/changes/ce/fix-13078.en.md b/changes/ce/fix-13078.en.md new file mode 100644 index 000000000..8bb9aee24 --- /dev/null +++ b/changes/ce/fix-13078.en.md @@ -0,0 +1 @@ +Added validation and error handling to ensure requests with a JSON body include the required 'application/json' Content-Type header. If missing, the API now returns a 415 Unsupported Media Type status instead of a 400. diff --git a/mix.exs b/mix.exs index 552e2fd15..b4e7db9f8 100644 --- a/mix.exs +++ b/mix.exs @@ -58,7 +58,7 @@ defmodule EMQXUmbrella.MixProject do {:ekka, github: "emqx/ekka", tag: "0.19.3", override: true}, {:gen_rpc, github: "emqx/gen_rpc", tag: "3.3.1", override: true}, {:grpc, github: "emqx/grpc-erl", tag: "0.6.12", override: true}, - {:minirest, github: "emqx/minirest", tag: "1.4.0", override: true}, + {:minirest, github: "emqx/minirest", tag: "1.4.1", override: true}, {:ecpool, github: "emqx/ecpool", tag: "0.5.7", override: true}, {:replayq, github: "emqx/replayq", tag: "0.3.8", override: true}, {:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true}, diff --git a/rebar.config b/rebar.config index 98f8e2177..bb75bf3b8 100644 --- a/rebar.config +++ b/rebar.config @@ -86,7 +86,7 @@ {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.19.3"}}}, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "3.3.1"}}}, {grpc, {git, "https://github.com/emqx/grpc-erl", {tag, "0.6.12"}}}, - {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.4.0"}}}, + {minirest, {git, "https://github.com/emqx/minirest", {tag, "1.4.1"}}}, {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.7"}}}, {replayq, {git, "https://github.com/emqx/replayq.git", {tag, "0.3.8"}}}, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}},