favicon.ico “not found error” in App Engine

前端 未结 4 1186
一向
一向 2020-12-13 17:10

I am trying to develop on Google App Engine and in the list of the errors displayed in the admin console I always see the following:

/favicon.ico

相关标签:
4条回答
  • 2020-12-13 17:44

    This entry should be placed before the entry for the main handler, like:

    - url: /favicon.ico
      static_files: media/img/favicon.ico
      upload: media/img/favicon.ico
    
    - url: /robots.txt
      static_files: media/robots.txt
      upload: media/robots.txt
    
    - url: .*
      script: main.py
    

    The entries are processed in order of apperance and first one that matches wins.

    0 讨论(0)
  • 2020-12-13 17:52

    I am using this snippet in a GAE app configuration:

    handlers:
    
      - url: /(.*\.(ico|png|webmanifest))$
        static_files: faviconfiles/\1
        upload: faviconfiles/.*\.(ico|png|webmanifest)$
    

    I then put the corresponding set of files (these days if you seriously want to set a "favicon" it's a set of files incl. e.g. apple-touch-icon.png) into the ./faviconfiles directory next to my app.yaml.

    0 讨论(0)
  • 2020-12-13 18:02

    For your application, favicon.ico should be a static image. You can upload a favicon.ico file with your application, and in your app.yaml file configure your application to serve the image when the url /favicon.ico is requested. Below is an example entry in your app.yaml file for /favicon.ico. We assume you include the favicon.ico file in the directory path static/images:

    - url: /favicon.ico
      static_files: static/images/favicon.ico
      upload: static/images/favicon.ico
    

    is written here

    0 讨论(0)
  • 2020-12-13 18:03

    If you are doing this in Java, I got rid of the error by putting a blank "favicon.ico" file in the "war" directory.

    If you want to make your own quick and ugly "favicon.ico" file, this website was super easy to use: http://www.favicon.cc/

    0 讨论(0)
提交回复
热议问题