Cron urls get a 403 status on Flexible Environment

旧街凉风 提交于 2019-12-23 08:47:55

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/36455800/cron-urls-get-a-403-status-on-flexible-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!