fix: do not require Content-Type for requests without body (#1707)

* fix: do not require Content-Type for requests without body

* fix: require Content-Type for feature update requests
This commit is contained in:
olav
2022-06-14 08:16:08 +02:00
committed by GitHub
parent c810959e26
commit 7ba8cd05eb
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -103,6 +103,7 @@ export default class ProjectFeaturesController extends Controller {
this.route({
method: 'post',
path: `${PATH_ENV}/off`,
acceptAnyContentType: true,
handler: this.toggleFeatureEnvironmentOff,
permission: UPDATE_FEATURE_ENVIRONMENT,
middleware: [
@@ -117,6 +118,7 @@ export default class ProjectFeaturesController extends Controller {
this.route({
method: 'post',
path: `${PATH_ENV}/on`,
acceptAnyContentType: true,
handler: this.toggleFeatureEnvironmentOn,
permission: UPDATE_FEATURE_ENVIRONMENT,
middleware: [
@@ -284,7 +286,6 @@ export default class ProjectFeaturesController extends Controller {
this.route({
method: 'put',
path: PATH_FEATURE,
acceptAnyContentType: true,
handler: this.updateFeature,
permission: UPDATE_FEATURE,
middleware: [
@@ -300,7 +301,6 @@ export default class ProjectFeaturesController extends Controller {
this.route({
method: 'patch',
path: PATH_FEATURE,
acceptAnyContentType: true,
handler: this.patchFeature,
permission: UPDATE_FEATURE,
middleware: [
+1
View File
@@ -32,6 +32,7 @@ class UserSplashController extends Controller {
this.route({
method: 'post',
path: '/:id',
acceptAnyContentType: true,
handler: this.updateSplashSettings,
permission: NONE,
middleware: [