diff options
author | 2023-06-06 23:50:43 -0700 | |
---|---|---|
committer | 2023-06-06 23:50:43 -0700 | |
commit | d265ed80d20267bc5252c31022af36d139bc283e (patch) | |
tree | 479830e709995033bb9911005890029c37ec970e /examples/openInEditor.js | |
parent | fa3cfd34cb1195f7068ff45576202accb74ff52e (diff) | |
download | bun-d265ed80d20267bc5252c31022af36d139bc283e.tar.gz bun-d265ed80d20267bc5252c31022af36d139bc283e.tar.zst bun-d265ed80d20267bc5252c31022af36d139bc283e.zip |
Docs for `Bun.password` and ws publish (#3227)
* Update websocket docs & jsdoc
* Document Bun.password
* Update hash encoding docs
* Fix typos
* Add info about user-specific data in ws
* Update outdated websocket jsdoc
* Replace usages of req.url
* Remove log
Diffstat (limited to 'examples/openInEditor.js')
-rw-r--r-- | examples/openInEditor.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/openInEditor.js b/examples/openInEditor.js index 3c67f02c2..30992d958 100644 --- a/examples/openInEditor.js +++ b/examples/openInEditor.js @@ -3,7 +3,8 @@ import { parse } from "querystring"; export default { fetch(req) { - if (req.url === "/favicon.ico") return new Response("nooo dont open favicon in editor", { status: 404 }); + const url = new URL(req.url); + if (url.pathname === "/favicon.ico") return new Response("nooo dont open favicon in editor", { status: 404 }); var pathname = req.url.substring(1); const q = pathname.indexOf("?"); |