我有一个 HTML 页面。该页面包含一个按钮。点击按钮,控制权转移到NGINX,NGINX将转移请求发送到后端服务器。
<a onclick="onLinkClick(event)" href="/data/">data</a>
这是 nginx.conf 的样子:
location /data/{
proxy_pass http://myserver:9988/;
rewrite (.*)/$ $1/index.html last;
index index.html?usr=simpson; # how can I pass query string parameter ?
}
每当页面打开时,我总是希望传递一个查询字符串参数。如何传递查询字符串参数?