vuerecipe
vuerecipe copied to clipboard
Catch all route is returning 500's for the /favicon.ico request
Browsers have a tendency to always try to fetch /favicon.ico, even if you don't define a favicon in the HTML head section browsers will still try to fetch /favicon.ico all the time.
The issue with the catch-all route "/{path:.+}" is that it's also picking up /favicon.ico, this leads to an error and 500 status code:
ERRO[2018-01-14T22:16:19+13:00] application.html: authenticity_token: unknown identifier content_type=image/webp db=0s duration="390.287µs" human_size="0 B" method=GET params="{"path":["favicon.ico"]}" path=/favicon.ico render="103.789µs" request_id=466c9136c3-1fc13a7c77 size=0 status=0
This basically means every /favicon.ico request is going to get a 500 status code back, it seems to be something to do with authenticity_token.