VirtualBox

source: vbox/trunk/src/VBox/Additions/3D/mesa/mesa-24.0.2/docs/ci/uri-caching.conf@ 105254

最後變更 在這個檔案從105254是 103996,由 vboxsync 提交於 12 月 前

Additions/3D/mesa: export mesa-24.0.2 to OSE. bugref:10606

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.2 KB
 
1set $proxy_authorization '';
2
3set_by_lua $proxyuri '
4 unescaped = ngx.unescape_uri(ngx.var.arg_uri);
5 it, err = ngx.re.match(unescaped, "(https?://)(.*@)?([^/]*)(/.*)?");
6 if not it then
7 -- Hack to cause nginx to return 404
8 return "http://localhost/404"
9 end
10
11 scheme = it[1];
12 authstring = it[2];
13 host = it[3];
14 query = it[4];
15
16 if ngx.var.http_authorization and ngx.var.http_authorization ~= "" then
17 ngx.var.proxy_authorization = ngx.var.http_authorization;
18 elseif authstring then
19 auth = string.sub(authstring, 0, -2);
20 auth64 = ngx.encode_base64(auth);
21 ngx.var.proxy_authorization = "Basic " .. auth64;
22 end
23
24 -- Default to / if none is set to avoid using the request_uri query
25 if not query then
26 query = "/";
27 end
28
29 return scheme .. host .. query;
30';
31
32add_header X-GG-Cache-Status $upstream_cache_status;
33proxy_set_header Authorization $proxy_authorization;
34
35proxy_pass $proxyuri;
36# Redirect back to ourselves on 301 replies
37proxy_redirect ~^(.*)$ /cache/?uri=$1;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette