We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e209b3 commit 3119fbdCopy full SHA for 3119fbd
src/Http/Responses/DataResponse.php
@@ -113,7 +113,9 @@ protected function handleDraft()
113
throw new NotFoundHttpException;
114
}
115
116
- $this->headers['X-Statamic-Draft'] = true;
+ if ($this->isLivePreview()) {
117
+ $this->headers['X-Statamic-Draft'] = true;
118
+ }
119
120
return $this;
121
tests/FrontendTest.php
@@ -45,7 +45,9 @@ function page_is_displayed()
45
]
46
]);
47
48
- $response = $this->get('/about')->assertStatus(200);
+ $response = $this->get('/about')
49
+ ->assertStatus(200)
50
+ ->assertHeaderMissing('X-Statamic-Draft');
51
52
$this->assertEquals('<h1>The About Page</h1> <p>This is the about page.</p>', trim($response->content()));
53
0 commit comments