Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@std/http: Failing to serve favicon #6120

Open
ArkhamCookie opened this issue Oct 15, 2024 · 0 comments
Open

@std/http: Failing to serve favicon #6120

ArkhamCookie opened this issue Oct 15, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@ArkhamCookie
Copy link

Describe the bug

Steps to Reproduce

deno.json:

{
  "imports": { "@std/http": "jsr:@std/http@^1.0.8" }
}

server.js:

import { serveDir } from "@std/http";

Deno.serve((request) => {
  return serveDir(request, {
    fsRoot: "public",
  });
});

public/index.html:

<!DOCTYPE html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, inital-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>

My file structure has the favicon in the public directory.

Run deno run --allow-net --allow-read server.js.

In the console it is saying that GET http://0.0.0.0:8000/favicon.ico failed, and the favicon doesn't show up.

Expected behavior

The favicon icon in head should be served and show up.

Environment

  • OS: EndeverOS (when running deno --version it is labeled as x86_64-unknown-linux-gnu)
  • deno version: 2.0.0
  • std version: 1.0.8
@ArkhamCookie ArkhamCookie added bug Something isn't working needs triage labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant