使用云功能创建外部负载平衡器到云CDN
我尝试使用CDN配置Google Cloud功能。 我尝试使用本教程: https://cloud.google。 com/cdn/doc/设置cdn-with-serverless
一个功能作为后端端点看起来都不错,如果我打开负载平衡前端IP,我会看到与打开直接功能URL相同的结果。并且似乎这意味着如果我使用此IP,现在可以通过CDN使用此功能。
但是我的功能太多了,因此我尝试使用端点中的所有功能使用URL蒙版。 URL掩码看起来像这样:
https://us-central1-my-real-project.cloudfunctions.net/<function>
我无法理解如何使用使用URL蒙版创建的云功能将负载平衡前端IP用于我的端点。 当我打开负载平衡IP时,我会得到:
Error: Not Found
The requested URL / was not found on this server.
PS。同样,如果我尝试打开http:// load-balancing-frontend-ip&gt;/my-function-name
upd:
在Google驱动器中放置的配置:配置:
< a href =“ https://drive.google.com/drive/folders/1ei9tx_sqcj_ujrlt-xzezua9bwklszik?usp = sharing” UA9BWKLSZIK ?usp =共享
(对不起,不知道如何共享其他方式配置,并且由于声誉较低而无法直接附加相关图像)
I try configure my Google Cloud Functions by using CDN.
I try use this tutorial: https://cloud.google.com/cdn/docs/setting-up-cdn-with-serverless
With one function as Backend Endpoint looks all good, and if I open Load Balancing Frontend IP I see same result as I open direct function URL. And seems that this means this function now work over CDN if I use this IP.
But I have too many functions, because of this I try use URL mask for all functions in my Endpoint.
URL mask looks like this:
https://us-central1-my-real-project.cloudfunctions.net/<function>
Problem that I cant understand how I can use Load Balancing Frontend IP for my Endpoint with Cloud Functions created with URL mask.
When I open Load Balancing IP I get:
Error: Not Found
The requested URL / was not found on this server.
PS. Same if I try open http://<load-balancing-frontend-ip>/my-function-name
UPD:
Configurations in screenshots placed in google drive:
https://drive.google.com/drive/folders/1eI9tx_SQcJ_uJrlt-xzeZua9bwklszik?usp=sharing
(sorry, not know how share other way configuration, and cant attach images direct in question because of low reputation)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如文档< /a>,URL掩码必须仅是
/&lt; function&gt;
。以前没有URL。As described in the documentation, the URL mask must be only
/<function>
. No URL before.