An unexpected favicon request
Sean Conner
sean at conman.org
Tue May 26 21:48:12 BST 2020
It was thus said that the Great Thomas Karpiniec once stated:
> Thanks for the comments all. Clearly there is no consensus whatsoever
> on how favicons work so there is no right or wrong. It's interesting
> to hear about the special casing in GLV-1.12556.
It's not that special of a special case. I just added the feature to
serve up a single page:
handlers =
{
{
path = "^/motd$",
module = "GLV-1.handlers.file",
file = "/etc/motd"
},
...
}
In the above example, it's for serving up a page that might not live in
a directory with the rest of the content. The "path" defines the path
portion of the URL to be matched, so for the favicon.ico, all I had to do
was:
handlers =
{
{
path = "^/.*favicon.ico$",
module = "GLV-1.handlers.file",
file = "/path/to/favicon.ico"
},
...
}
and made sure this was the first path checked.
-spc
More information about the Gemini
mailing list