[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\u003cp\u003eThe \u003ccode\u003eREGION_ID\u003c/code\u003e is a code assigned by Google based on the selected region when creating an app, and it is included in App Engine URLs for apps created after February 2020.\u003c/p\u003e\n"],["\u003cp\u003eFor security, certain HTTP headers sent by clients are removed from incoming requests, specifically those matching the \u003ccode\u003eX-Google-*\u003c/code\u003e pattern and exact matches of App Engine-specific header names like \u003ccode\u003eX-Appengine-Country\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine adds several specific headers to all requests, including \u003ccode\u003eX-Appengine-Country\u003c/code\u003e, \u003ccode\u003eX-Appengine-Region\u003c/code\u003e, \u003ccode\u003eX-Appengine-City\u003c/code\u003e, and \u003ccode\u003eX-Appengine-CityLatLong\u003c/code\u003e, which provide information about the request's origin.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eX-Forwarded-For\u003c/code\u003e header provides a comma-delimited list of IP addresses that the client request has been routed through, and \u003ccode\u003eX-Forwarded-Proto\u003c/code\u003e indicates the protocol used by the client to connect.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine also sets headers, for internal use, such as \u003ccode\u003eX-Appengine-Https\u003c/code\u003e, \u003ccode\u003eX-Appengine-User-IP\u003c/code\u003e, \u003ccode\u003eX-Appengine-Api-Ticket\u003c/code\u003e, \u003ccode\u003eX-Appengine-Request-Log-Id\u003c/code\u003e, \u003ccode\u003eX-Appengine-Default-Version-Hostname\u003c/code\u003e, and \u003ccode\u003eX-Appengine-Timeout-Ms\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Request headers\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### Region ID\n\nThe \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e is an abbreviated code that Google assigns\nbased on the region you select when you create your app. The code does not\ncorrespond to a country or province, even though some region IDs may appear\nsimilar to commonly used country and province codes. For apps created after\nFebruary 2020, \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e`.r` is included in\nApp Engine URLs. For existing apps created before this date, the\nregion ID is optional in the URL.\n\nLearn more\n[about region IDs](/appengine/docs/flexible/python/how-requests-are-routed#region-id). \nOK\n\nUse this reference page for details about what HTTP headers are supported\n. To understand how App Engine receives\nrequests and sends responses, see [How Requests Are\nHandled](/appengine/docs/flexible/how-requests-are-handled).\n\nRequest headers\n---------------\n\nAn incoming HTTP request includes the HTTP headers sent by the client. For\nsecurity purposes, some headers are sanitized, amended, or removed by\nintermediate proxies before they reach the application.\n\n### Headers removed from incoming requests\n\nThe following headers are removed from incoming requests if a client sends them:\n\n- Headers with names that match the `X-Google-*` pattern. This name pattern\n is reserved for Google.\n\n- Headers with names that match\n [App Engine-specific headers](#app_engine-specific_headers). Only\n exact, case-insensitive matches are removed. For example, headers named\n `X-Appengine-Country` or `X-AppEngine-Country` will be removed but\n `X-Appengine-Cntry` will not.\n\n### App Engine-specific headers\n\nAs a service to the app, App Engine adds the following headers to all requests:\n\n`X-Appengine-Country`\n: Country from which the request originated, as an [ISO 3166-1\n alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.\n App Engine determines this code from the client's IP address. Note that\n the country information is not derived from the WHOIS database; it's possible\n that an IP address with country information in the WHOIS database will not have\n country information in the `X-Appengine-Country` header. Your application should\n handle the special country code `ZZ` (unknown country).\n\n`X-Appengine-Region`\n: Name of region from which the request originated. This value only makes\n sense in the context of the country in `X -Appengine-Country`. For example, if\n the country is \"US\" and the region is \"ca\", that \"ca\" means \"California\", not\n Canada. The complete list of valid region values is found in the\n [ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) standard.\n\n`X-Appengine-City`\n: Name of the city from which the request originated. For example, a request\n from the city of Mountain View might have the header value `mountain view`.\n There is no canonical list of valid values for this header. If the city can't\n be resolved, the header value is set to `?`.\n\n`X-Appengine-CityLatLong`\n: Latitude and longitude of the city from which the request originated. This\n string might look like \"37.386051,-122.083851\" for a request from Mountain View.\n If the city can't be resolved, the header value is set to `0.000000,0.000000`.\n\n`X-Cloud-Trace-Context`\n: A unique identifier for the request used for [Cloud Trace](/trace)\n and [Cloud Logging](/logging). There isn't an option to disable this header\n or choose the sampling rate for tracing since all App Engine standard environment apps are traced\n automatically.\n\n`X-Forwarded-For: [CLIENT_IP(s)], [global forwarding rule IP]`\n\n: A comma-delimited list of IP addresses through which the client request has\n been routed. The first IP in this list is generally the IP of the client that\n created the request. The subsequent IPs provide information about proxy servers\n that also handled the request before it reached the application server. For\n example:\n\n X-Forwarded-For: clientIp, proxy1Ip, proxy2Ip\n\n`X-Forwarded-Proto [http | https]`\n\n: Shows `http` or `https` based on the protocol the client used to connect to\n your application.\n\n The Google Cloud Load Balancer terminates all `https` connections, and then\n forwards traffic to App Engine instances over `http`. For example, if a user\n requests access to your site via\n `https://`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003e\u003ca href=\"#appengine-urls\" style=\"border-bottom: 1px dotted #999\" class=\"devsite-dialog-button\" data-modal-dialog-id=\"regional_url\" track-type=\"progressiveHelp\" track-name=\"modalHelp\" track-metadata-goal=\"regionalURL\"\u003eREGION_ID\u003c/a\u003e\u003c/var\u003e`.r.appspot.com`, the X-\n Forwarded-Proto header value is `https`.\n\nIn addition, App Engine may set the following headers which are for\ninternal use by App Engine:\n\n- `X-Appengine-Https`\n- `X-Appengine-User-IP`\n- `X-Appengine-Api-Ticket`\n- `X-Appengine-Request-Log-Id`\n- `X-Appengine-Default-Version-Hostname`\n- `X-Appengine-Timeout-Ms`\n\n\u003cbr /\u003e"]]