Add TRACE to allowed import methods (#2783)

This commit is contained in:
Niklas
2024-08-08 13:58:17 +02:00
committed by GitHub
parent de226d2e44
commit 4c3fe2f719
2 changed files with 2 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ const varsSchema = Yup.object({
const requestUrlSchema = Yup.string().min(0).defined();
const requestMethodSchema = Yup.string()
.oneOf(['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'])
.oneOf(['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS', 'TRACE'])
.required('method is required');
const graphqlBodySchema = Yup.object({

View File

@@ -32,7 +32,7 @@ describe('Request Schema Validation', () => {
return Promise.all([
expect(requestSchema.validate(request)).rejects.toEqual(
validationErrorWithMessages(
'method must be one of the following values: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS'
'method must be one of the following values: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, TRACE'
)
)
]);