mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-09 01:17:06 +02:00
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:
parent
c810959e26
commit
7ba8cd05eb
@ -103,6 +103,7 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
this.route({
|
this.route({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: `${PATH_ENV}/off`,
|
path: `${PATH_ENV}/off`,
|
||||||
|
acceptAnyContentType: true,
|
||||||
handler: this.toggleFeatureEnvironmentOff,
|
handler: this.toggleFeatureEnvironmentOff,
|
||||||
permission: UPDATE_FEATURE_ENVIRONMENT,
|
permission: UPDATE_FEATURE_ENVIRONMENT,
|
||||||
middleware: [
|
middleware: [
|
||||||
@ -117,6 +118,7 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
this.route({
|
this.route({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: `${PATH_ENV}/on`,
|
path: `${PATH_ENV}/on`,
|
||||||
|
acceptAnyContentType: true,
|
||||||
handler: this.toggleFeatureEnvironmentOn,
|
handler: this.toggleFeatureEnvironmentOn,
|
||||||
permission: UPDATE_FEATURE_ENVIRONMENT,
|
permission: UPDATE_FEATURE_ENVIRONMENT,
|
||||||
middleware: [
|
middleware: [
|
||||||
@ -284,7 +286,6 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
this.route({
|
this.route({
|
||||||
method: 'put',
|
method: 'put',
|
||||||
path: PATH_FEATURE,
|
path: PATH_FEATURE,
|
||||||
acceptAnyContentType: true,
|
|
||||||
handler: this.updateFeature,
|
handler: this.updateFeature,
|
||||||
permission: UPDATE_FEATURE,
|
permission: UPDATE_FEATURE,
|
||||||
middleware: [
|
middleware: [
|
||||||
@ -300,7 +301,6 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
this.route({
|
this.route({
|
||||||
method: 'patch',
|
method: 'patch',
|
||||||
path: PATH_FEATURE,
|
path: PATH_FEATURE,
|
||||||
acceptAnyContentType: true,
|
|
||||||
handler: this.patchFeature,
|
handler: this.patchFeature,
|
||||||
permission: UPDATE_FEATURE,
|
permission: UPDATE_FEATURE,
|
||||||
middleware: [
|
middleware: [
|
||||||
|
@ -32,6 +32,7 @@ class UserSplashController extends Controller {
|
|||||||
this.route({
|
this.route({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: '/:id',
|
path: '/:id',
|
||||||
|
acceptAnyContentType: true,
|
||||||
handler: this.updateSplashSettings,
|
handler: this.updateSplashSettings,
|
||||||
permission: NONE,
|
permission: NONE,
|
||||||
middleware: [
|
middleware: [
|
||||||
|
Loading…
Reference in New Issue
Block a user