Layer7 API Management

Expand all | Collapse all

Annoying favicon.ico log messages in API Gateway

Jump to Best Answer
  • 1.  Annoying favicon.ico log messages in API Gateway

    Posted 05-19-2017 05:57 PM

    I see a lot of annoying messages in my ssg logs

    com.l7tech.server.MessageProcessor: Request URL not resolved: https://api_gw_fqdn/favicon.ico

    I believe I understand this to be user's browsers trying to get the little icon that shows up in the favorites bar in some browsers.  

     

    Can I add a web api at that url that simply returns an icon file to get rid of these messages?  

    --or--

    Can I add a web api at that url that simply returns "ok" since I really don't want to give someone an icon file

    --or--

    would i be causing my gateway more "effort" than it is worth to serve that file or this "ok" message and just live with this in the logs.  



  • 2.  Re: Annoying favicon.ico log messages in API Gateway

    Posted 05-19-2017 08:07 PM

    Good afternoon,

     

    We have seen a several ways to handle this depending on the end result. 

     

    1) Ignore the error message

    2) Create a service with */favicon.ico as the URI and return an empty return template with status 200

    3) Create a service with */favicon.ico as the URI that links to central location to get your corporate favicon using a HTTP routing assertion and use the cache assertion store and retrieve to avoid excessive outbound calls, or take the hex value of the favicon file and put it in a return template.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support 



  • 3.  Re: Annoying favicon.ico log messages in API Gateway
    Best Answer

    Posted 05-21-2017 08:51 PM
      |   view attached

    Hello pwhelan81 ,

    If you like to return a real favicon, you may,

    1. Publish /favicon.ico endpoint (base64 encode an icon image first, put it in src context variable, Request source of Route via http is set as message target)

    2. Publish /showicon endpoint

     

    Sample policies are attached.

     

    Regards,

    Mark

    Attachment(s)

    zip
    favicon.zip   3K 1 version