I'm attempting to add a "Report-To:" HTTP header to our App Engine's app.yaml configuration file for integration with https://report-uri.com (based on the Reporting API here, here, and here) but when I push the changes to the repository, Cloud Build fails and returns the following error:
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [/workspace/app.yaml]
in "/workspace/app.yaml", line 21, column 27
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/gcloud" failed: exit status 1
Line 21 of the app.yaml corresponds to the new header:
handlers:
- url: /
static_files: www/index.html
upload: www/index.html
secure: always
redirect_http_response_code: 301
http_headers:
Report-To: {"group":"default","max_age":31536000,"endpoints":[{"url":"https://*REDACTED*.report-uri.com/a/d/g"}],"include_subdomains":true}
I've tried different iterations of the header including the following:
handlers:
- url: /
static_files: www/index.html
upload: www/index.html
secure: always
redirect_http_response_code: 301
http_headers:
Report-To: {"max_age":31536000, "url":"https://*REDACTED*.report-uri.com/a/d/g"}
This is the only line item that throws an error on deployment. If removed, the new version goes live. Is it because the header is not supported on App Engine or a mistake in our syntax? Let me know if there are any additional steps to take.