Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

huangapple go评论85阅读模式
英文:

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

问题

我正在托管一个ReactJS SPA作为静态网页,放在存储账户的$web容器中。

我已经上传了构建文件。
我已经启用了静态网站,并且已经完成了所有的设置,以便在我输入主要终端点URL时,可以从浏览器中查看SPA:https://myappjohndev1.z11.web.core.windows.net/

现在,我不想让用户使用存储账户的终端点URL访问我的网站,而是想在前面放置Azure FrontDoor,用户将访问FrontDoor。

存储账户的静态网站已设置为前端Door的后端。以下是前端Door的完整设置:

前端/域名:

  • 配置为:https://devjohn1.azurefd.net

后端池:

  • 后端主机类型:自定义主机
  • 后端主机名:myappjohndev1.z11.web.core.windows.net

我还尝试过将后端配置为:

  • 后端主机类型:存储
  • 后端主机名:选择当前托管SPA的存储账户。

然而,当我访问https://devjohn1.azurefd.net时,浏览器显示如下内容:

此 XML 文件似乎没有与其关联的任何样式信息。下面显示了文档树。
<Error>
<Code>InvalidQueryParameterValue</Code>
<Message>请求URI中指定的一个查询参数的值无效。RequestId:4a8be0c9-701e-0055-60d8-b727f2000000 时间:2023-07-16T11:27:09.4837987Z</Message>
<QueryParameterName>comp</QueryParameterName>
<QueryParameterValue/>
<Reason/>
</Error>

我不知道如何继续操作。有什么建议吗?

英文:

I am hosting a reactJS SPA as static webpage on storage account's $web container.

I have uploaded the build files already.
I have enabled static website and I have done all the things such that I can view the SPA from my browser when I enter the primary endpoint url: https://myappjohndev1.z11.web.core.windows.net/

Now, instead of letting users visit my website using this storage account endpoint url, I want to put Azure FrontDoor in front of it, and users will visit the frontdoor instead.

The storage account static website is set as a backend in the frontdoor. Here are the full settings of the frontdoor:

The frontend / domains:

  • configured to be: https://devjohn1.azurefd.net

The backend pool:

  • Backend host type: Custom host
  • backend host name: myappjohndev1.z11.web.core.windows.net

I have also tried to configure the backend as:

  • Backend host type: Storage
  • backend host name: select the storage account that is hosting the SPA now.

However, when I visit https://devjohn1.azurefd.net, I get this in the browser:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>InvalidQueryParameterValue</Code>
<Message>Value for one of the query parameters specified in the request URI is invalid. RequestId:4a8be0c9-701e-0055-60d8-b727f2000000 Time:2023-07-16T11:27:09.4837987Z</Message>
<QueryParameterName>comp</QueryParameterName>
<QueryParameterValue/>
<Reason/>
</Error>

I have no idea how to proceed from here.
any suggestions?

答案1

得分: 1

创建 Azure 前端门户高级版,您需要创建私有链接服务和 WAF 策略。

创建一个带有 Azure 高级版的 WAF 策略,检测模式如下:

在 Azure 前端门户中选择自定义源类型的高级版,使用静态网站主机名,并启用私有链接服务与 WAF 策略,如下:

一旦创建了前端门户,在私有链接中,像下面这样批准私有终结点连接的请求:

已更新的 NAT 配置:

现在,当我尝试将 Azure 前端门户的 URL 重定向到存储账户的静态网站作为前端门户中的后端时,成功获得结果。

英文:

To create Azure front door premium, you need to create private link service and WAF policy.

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

Create a WAF policy with Azure premium tier with detection mode:

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

In Azure front door select premium tier with custom origin type with static website host name and enable private link service with WAF policy like below:

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

Once front door created, in private link Approve the request in private endpoint connection like below

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

Updated NAT configuration:

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

Now, when I try to redirect azure front door URL with storage account static website is set as a backend in the front door got result successfully.

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

Azure: Frontdoor and storage account getting InvalidQueryParameterValue error on QueryParameterName `comp`

huangapple
  • 本文由 发表于 2023年7月17日 14:40:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76702023.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定