Execution Trace Quiz - 3 Questions
Test your understanding
Which step confirms the presence of the Content-Security-Policy header?
X-Frame-Options header controls if a page can be framed.Content-Security-Policy header exists in the response?pm.response.headers.get() returns the header value or null if missing.X-Content-Type-Options is missing?
pm.test('X-Content-Type-Options header is set', () => {
pm.response.to.have.header('X-Content-Type-Options');
});pm.response.to.have.header() asserts the header must exist.Strict-Transport-Security header includes max-age=31536000:
pm.test('HSTS max-age check', () => {
pm.expect(pm.response.headers.get('Strict-Transport-Security')).to.include('max-age=31536000');
});Content-Security-Policy header disallows inline scripts by including script-src 'self'. Which test script correctly validates this?script-src 'self'.to.include checks if the string contains the directive, allowing other parts.Pass the test and this pattern moves unknown