mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 20:46:15 -04:00
respond: Add Content-Type note to the heredoc HTML example
This commit is contained in:
parent
d931345756
commit
029b64bef8
1 changed files with 2 additions and 1 deletions
|
@ -55,9 +55,10 @@ respond /secret/* "Access denied" 403 {
|
|||
}
|
||||
```
|
||||
|
||||
Write an HTML response, using [heredoc syntax](/docs/caddyfile/concepts#heredocs) to control whitespace:
|
||||
Write an HTML response, using [heredoc syntax](/docs/caddyfile/concepts#heredocs) to control whitespace, and also setting the `Content-Type` header to match the response body:
|
||||
|
||||
```caddy-d
|
||||
header Content-Type text/html
|
||||
respond <<HTML
|
||||
<html>
|
||||
<head><title>Foo</title></head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue