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

Closed
ArkhamCookie opened this issue Oct 15, 2024 · 2 comments
Closed

@std/http: Failing to serve favicon #6120

ArkhamCookie opened this issue Oct 15, 2024 · 2 comments
Labels
needs information Requires further information

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
@kt3k kt3k added needs information Requires further information and removed bug Something isn't working needs triage labels Oct 22, 2024
@kt3k
Copy link
Member

kt3k commented Oct 22, 2024

In the console it is saying that GET http://0.0.0.0:8000/favicon.ico failed

What's the exact error message? What does network panel say about http://0.0.0.0:8000/favicon.ico?

@ArkhamCookie
Copy link
Author

Sorry for the late response. It seems to have been fixed in some update. Thanks for your time. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs information Requires further information
Projects
None yet
Development

No branches or pull requests

2 participants