Quick Links

Fetch-url-http-3a-2f-2fmetadata.google.internal-2fcomputemetadata-2fv1-2finstance-2fservice | Accounts-2f //free\\

: You must include the HTTP header Metadata-Flavor: Google in your request. If this header is missing, the metadata server will reject the request to prevent Server-Side Request Forgery (SSRF) attacks.

Metadata-Flavor: Google

However, the string you provided ( fetch-url-http-3A-2F-2Fmetadata... ) appears to be URL-encoded. Here’s what’s happening: : You must include the HTTP header Metadata-Flavor:

// Wrong: URL-encoding the entire URL fetch(encodeURIComponent("http://metadata.google.internal/...")) : You must include the HTTP header Metadata-Flavor: