Cron网站在灵活环境中获得403个地位 [英] Cron urls get a 403 status on Flexible Environment
问题描述
我们正在尝试灵活环境,并且希望迁移现有的应用程序。一切看起来都很顺利,除了cron条目。
我们有一堆cron,每个url都以admin身份保护(如文档中所述),但每次如果url被用户通过浏览器击中,则一切正常。
在标准环境中,一切都很好。
有什么我们可以检查的?
我假设您在app.yaml处理程序部分中添加 login:admin
,以在Google App Engine标准环境中保护cron服务。
但在App Engine flex上,它改变了如何保护你的cron处理程序,例如:(PHP示例):
检查$ _SERVER ['HTTP_X_APPENGINE_CRON'],如果它是真的,请求来自App Engine cron服务。
We are experimenting with Flexible Environment and we want to migrate an existing application. Everything seems to go well except from cron entries.
We have a bunch of cron and every url is secured as admin" (as stated in the documentation), but every time the url is hit by the cron service we get a 403 status, if the url is hit by the user via browser everything works well.
On standard environment everything is good.
Is there anything we can check about?
I assume you add login: admin
in app.yaml handler section to secure cron service on Google App Engine standard environment.
But on App Engine flex, it changed how to secure your cron handlers like this (PHP example):
Check $_SERVER['HTTP_X_APPENGINE_CRON'] and if it's true, the requests are coming from App Engine cron service.
这篇关于Cron网站在灵活环境中获得403个地位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!