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

[Enhancement]: Add Handler for favicon.ico #36

Open
3 tasks done
0SkillAllLuck opened this issue Nov 17, 2022 · 0 comments
Open
3 tasks done

[Enhancement]: Add Handler for favicon.ico #36

0SkillAllLuck opened this issue Nov 17, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@0SkillAllLuck
Copy link
Contributor

Description

Most browsers and other tools expect a favicon to be present on /favicon.ico. To help with this behaviour a utility function to simplify the registration of that endpoint. Optionally a automatic conversion from PNG/JPEG or other image formats to ICO might be a good thing to have.

Additional Context

No response

Code Snippet

package main

import "github.com/go-mojito/mojito"
import "github.com/go-mojito/mojito/handler"

func main() {
  mojito.GET("/", func(ctx mojito.Context) {
    ctx.String("Hello World")
  })
  handler.HandleFavicon()
  mojito.ListenAndServe(":8123")
}

Checklist:

  • I agree to follow Mojito's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests reports may be closed without explanation.
@0SkillAllLuck 0SkillAllLuck added the enhancement New feature or request label Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant