{"id":24383352,"url":"https://github.com/firstandthird/hapi-favicon","last_synced_at":"2025-04-11T01:12:25.323Z","repository":{"id":53726375,"uuid":"43447057","full_name":"firstandthird/hapi-favicon","owner":"firstandthird","description":"Return something for those annoying favicon.ico requests","archived":false,"fork":false,"pushed_at":"2021-03-17T18:29:20.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-11T01:12:20.161Z","etag":null,"topics":["hapi-plugin","hapi-v17"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firstandthird.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-30T17:15:16.000Z","updated_at":"2024-06-08T19:58:56.000Z","dependencies_parsed_at":"2022-09-13T08:11:15.027Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/hapi-favicon","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-favicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-favicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-favicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-favicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/hapi-favicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322571,"owners_count":21084337,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hapi-plugin","hapi-v17"],"created_at":"2025-01-19T10:14:18.553Z","updated_at":"2025-04-11T01:12:25.309Z","avatar_url":"https://github.com/firstandthird.png","language":"JavaScript","readme":"# hapi-favicon\n\nA simple [hapi](https://hapi.dev/) plugin that serves the favicon.ico route\nfor you.  This is the icon that will appear in browser tabs.\n\n## Installation\n\n```\nnpm install hapi-favicon\n```\n\n## Basic Icons\n\nJust register the plugin with your hapi server:\n\n```js\n await server.register({\n   plugin: require('hapi-favicon'),\n   options: {\n     path: '/path/to/standard/icons/standard.ico'\n   }\n });\n```\n\nwhere _path_ is the local file path to your favicon image.  This will register a route with hapi at\nthe standard _/favicon.ico_ route that returns your icon with the _image/x-icon_ mime header type. Leaving _path_ blank will just serve a blank image.\n\n## Apple Touch Icons\n\nYou can tell hapi-favicon to also serve Apple touch icons for Apple-specific devices, in addition to the standard .ico icons:   \n\n```js\n await server.register({\n   plugin: require('hapi-favicon'),\n   options: {\n     path: '/path/to/standard/icons/standard.ico',\n     appleTouch: '/path/to/apple/icons/'\n   }\n);\n```\n\nThis will register a route at _'/apple-touch-icon{size?}.png'_ that serves the corresponding PNG icon from the _/path/to/apple/icons_ folder.  Sizes supported are the Apple-standard dimensions: 57x57, 60x60, 72x72, 76x76, 114x114, 120x120, 144x144, 152x152.  If the client requests dimensions other than these standard dimensions, the plugin will default to the next-lowest size.  For example if you request _/apple-touch-icon65x65.png_, you will get the _apple-touch-icon60x60.png_ icon instead.\n\nSetting the _appleTouch_ icon to _true_ instead of a file path will result in the _'/apple-touch-icon{size?}.png'_ route serving an empty _image/x-icon_ for all requested image sizes.\n\n## Auth option\n\nIf you want your favicon.ico route to be protected by your hapi [auth](https://hapi.dev/api/?v=20.1.0#-routeoptionsauth) scheme, you can specify the auth config like so:\n\n```js\nawait server.register({\n  plugin: require('hapi-favicon'),\n  options: {\n    path: '/path/to/standard/icons/standard.ico',\n    auth: {\n      strategy: 'cookie',\n      mode: 'try'\n    }\n  }\n);\n```\n\nThis only applies to the favicon.ico route, Apple touch icons will be publicly available. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fhapi-favicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Fhapi-favicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fhapi-favicon/lists"}