favicon

Setting favicon in FastAPI over https

Setting favicon in FastAPI over https Question: I have deployed an API on a Ubuntu server and set-up Nginx and SSL so that all requests are made through https. In FastAPI, I have set a favicon route to set the favicon for the site and this works during development, however in production I get the …

Total answers: 1

How to serve static files from a different directory than the static path?

How to serve static files from a different directory than the static path? Question: I am trying this: favicon_path = ‘/path/to/favicon.ico’ settings = {‘debug’: True, ‘static_path’: os.path.join(PATH, ‘static’)} handlers = [(r’/’, WebHandler), (r’/favicon.ico’, tornado.web.StaticFileHandler, {‘path’: favicon_path})] application = tornado.web.Application(handlers, **settings) application.listen(port) tornado.ioloop.IOLoop.instance().start() But it keeps serving the favicon.ico that I have in my static_path (I …

Total answers: 3

Is there a Python library for generating .ico files?

Is there a Python library for generating .ico files? Question: I’m looking to create favicon.ico files programatically from Python, but PIL only has support for reading ico files. Asked By: Hank Gay || Source Answers: Perhaps the following would work: Generate your icon image using PIL Convert the image to .ico format using the python …

Total answers: 7