Been pulling my hair trying to figure out why can't favicon.ico
loads properly. Needed help from Google Cloud AppEngine gurus.
The project is a React App where gcp-build
will generate a build
folder with favicon.ico
in it.
Consider the following cloudbuild.yaml
:
steps:
- name: node:12
args: ["yarn"]
- name: node:12
args: ["yarn", "gcp-build"]
- name: node:12
args: ["rm", "-rf", "node_modules"]
- name: "gcr.io/cloud-builders/gcloud"
args: ["app", "deploy", "--version=mark0"]
timeout: "1600s"
And app.yaml
looks like:
service: react-demo
runtime: nodejs12
handlers:
- url: /favicon.ico
static_files: build/favicon.ico
upload: build/favicon.ico
Hitting the page https://react-demo-dot-xxxx-xxxxx.df.r.appspot.com/favicon.ico will always get a 404 error.
Can anyone help please?