You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 96eb7be
Browse filesBrowse the repository at this point in the historyBrowse files
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36",
59
+
"requestHeaders": {
60
+
"Accept-Language": "en-US,en;q=0.9",
61
+
"Referer": "https://drive.google.com/"
62
+
},
59
63
"maxRequestBytes": 872,
60
64
"originUrlReplacementRules": [
61
65
{
@@ -145,6 +149,12 @@ If the server uses the default `pathPrefix`, the client `originUrl` should inclu
145
149
146
150
(Client only) `User-Agent` sent to Google Docs Viewer. You should use a real browser user agent to avoid google's blocking.
147
151
152
+
> `requestHeaders`: \{\[key: string\]: string \}
153
+
154
+
(Client only) Extra HTTP request headers sent to `viewerUrl` and `textUrl`. This can be used to set browser-like headers such as `Accept-Language` or `Referer`. (v5.51.2+)
155
+
156
+
If `requestHeaders` contains `User-Agent`, it overrides `userAgent`. If it contains `Host`, it is handled as the HTTP Host header and overrides `viewerHostHeader`. These headers are sent only from the client to Google Docs Viewer; they do not control the headers that Google Docs Viewer sends to `originUrl`.
157
+
148
158
> `h2PoolSize`: number
149
159
150
160
(Client only) HTTP/2 connection pool size. The default is determined by the underlying HTTP round tripper.
@@ -201,5 +211,6 @@ The same rule generates one value per request and replaces all matching placehol
201
211
* The outer client outbound target is normally an address that can reach Google services, used with TLS `serverName`.
202
212
*`sharedKey` is recommended; without it, the origin path and response body are not protected by transport encryption.
203
213
* This transport performs multiple HTTP requests and its performance and reliability depend on Google Docs Viewer behavior.
214
+
* The direct `gdocsviewer` transport uses a request assembler with idle polling backoff and server-side long polling. Empty polls may wait before returning so idle connections do not continuously consume Google Docs Viewer quota.
204
215
205
-
(This document is generated with assist from LLM, and reviewed by author.)
216
+
(This document is generated with assist from LLM, and reviewed by author.)
0 commit comments