mirror of
https://github.com/seejohnrun/haste-server.git
synced 2025-12-14 01:25:56 +00:00
serve 404 when not possible key
This commit is contained in:
@@ -78,6 +78,11 @@ DocumentHandler.prototype.chooseKey = function(callback) {
|
||||
});
|
||||
};
|
||||
|
||||
// Return a boolean indicating whether or not something can be a key
|
||||
DocumentHandler.potentialKey = function(key) {
|
||||
return key.match(/^[a-zA-Z0-9]+$/);
|
||||
};
|
||||
|
||||
// Generate a random key
|
||||
DocumentHandler.prototype.randomKey = function() {
|
||||
var text = '';
|
||||
|
||||
Reference in New Issue
Block a user