bind
Binding controls the binding of filename suffixes to content types.
Works closely with handlers, which control how
the different content types are serviced.
|
Attributes
|
| name |
default |
description |
| .suffix |
N/A
|
Content type in the MIME type manner,
such as: text/html. There may be as many mappings
as are required.
|
Note that ScriptContentHandler is used
both for scripts and templates. The first non-whitespace character in the file determines its type:
if it is ``<'', the file is assumed to be a template; otherwise, it is a script.
Example:
zone:
path = api/
# let's override the default behaviour to map .html to script/template
bind:
.html = text/html
end
handlers:
text/html = anvil.server.DefaultContentHandler
end
end
Add a note
|