hasura / hasura/graphql-engine

"url":"/favicon.ico" | "path":"$","error":"resource does not exist","code":"not-found"

Open
#7,703 1 comment 3 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

My hasura graphql endpoint is exposed to the internet, and I often see this kind of errors in the logs:
```
{"type":"http-log","timestamp":"2021-10-19T12:44:48.418+0000","level":"error","detail":{"operation":{"error":{"path":"$","error":"resource does not exist","code":"not-found"},"request_id":"7d7334ae-624b-4d9a-a81d-f373dfee26c8","response_size":65,"request_mode":"error"},"request_id":"7d7334ae-624b-4d9a-a81d-f373dfee26c8","http_info":{"status":404,"http_version":"HTTP/1.1","url":"/favicon.ico","ip":"x.x.x.x","method":"GET","content_encoding":null}}}
```

### Describe the solution you'd like

This is kind of polluting the logs (call `/favicon.ico` on `/graphql` endpoint) I think these requests are due to crawling bots (like google?). Is there a `Robots.txt` to put somewhere or any other solution to prevent these kind of requests?

EDIT: IT's the Hasura frontend that is actually sending these requests!

Contributor guide

Open the contributing guide

Research direction

No source file or test is identified. Start by reproducing the /favicon.ico request against the /graphql endpoint and inspect how the Hasura frontend generates it; done should mean these requests no longer unnecessarily pollute the error logs.

Written by the indexing model from the issue text.

Assessment

Domain
api, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.