mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Support GET and HEAD.
This commit is contained in:
parent
a09e208b0a
commit
a5365f2547
2 changed files with 12 additions and 4 deletions
|
@ -85,10 +85,18 @@ function _handle(req, res, jsFilename, jsFiles) {
|
|||
res.writeHead(304, {});
|
||||
res.end();
|
||||
} else {
|
||||
if (settings.minify) {
|
||||
respondMinified();
|
||||
if (req.method == 'HEAD') {
|
||||
res.writeHead(200, {});
|
||||
res.end();
|
||||
} else if (req.method == 'GET') {
|
||||
if (settings.minify) {
|
||||
respondMinified();
|
||||
} else {
|
||||
respondRaw();
|
||||
}
|
||||
} else {
|
||||
respondRaw();
|
||||
res.writeHead(405, {'allow': 'HEAD, GET'});
|
||||
res.end();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue