forked from efficience-it/certification-symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
http_methods_matching.yaml
38 lines (38 loc) · 2.34 KB
/
http_methods_matching.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
questions:
-
uuid: 1eebf878-8b9a-6004-ac79-99d84c92580c
question: 'Which information is used to store a response that uses the must-understand directive, so it can be stored if the cache understand the directive?'
answers:
- {value: 'The value of the Etag directive', correct: false}
- {value: 'The value of the Expires directive', correct: false}
- {value: 'The value of the Last-Modified directive', correct: false}
- {value: 'The status code', correct: true}
help: 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#directives'
-
uuid: 1eebf878-8ba1-6016-beaf-99d84c92580c
question: 'Using XML, how to ensure that a route is accessed via HTTPS?'
answers:
- {value: 'schemes= https ', correct: true}
- {value: 'https= true ', correct: false}
- {value: 'protocol= https ', correct: false}
- {value: 'ensure= https ', correct: false}
help: 'https://symfony.com/doc/current/routing.html#forcing-https-on-generated-urls'
-
uuid: 1eebf878-8ba1-6214-83d0-99d84c92580c
question: 'How to force a secure area to use the HTTPS protocol in the security config?'
answers:
- {value: 'access_control: { path: ^/secure, requires_channel: https }', correct: true}
- {value: 'access_control: { path: ^/secure, use_https: true}', correct: false}
- {value: 'access_control: { path: ^/secure, always_use_https: true}', correct: false}
- {value: 'access_control: { path: ^/secure, schemes: [https] }', correct: false}
help: 'https://symfony.com/doc/current/security/force_https.html'
-
uuid: 1eebf878-8ba8-630c-87f9-99d84c92580c
question: 'How to force to send a method PUT in a form ?'
answers:
- {value: 'by adding: <input type= hidden name= _method value= PUT >', correct: true}
- {value: 'with <form method= PUT ></form>', correct: false}
- {value: "framework.http_method_override option is true and$form = $this->createFormBuilder($task)->setMethod('PUT')", correct: true}
- {value: "framework.http_method_override option is true and{{ form_start(form, {'method': 'PUT'}) }}", correct: true}
- {value: "framework.http_method_override option is true and$form = $this->createForm(TotoType::class, $toto, ['method' => 'PUT', ]);", correct: true}
help: 'https://symfony.com/doc/6.4/routing.html#matching-http-methods'