app.yaml

Adding HSTS headers in app.yaml (Google App Engine)

故事扮演 提交于 2021-02-19 03:42:08
问题 I have the following handlers section in my app.yaml : handlers: - url: /(robots\.txt|sitemap\.xml) static_files: \1 upload: (robots\.txt|sitemap\.xml) secure: always http_headers: Strict-Transport-Security: 'max-age=63072000; includeSubDomains; preload' - url: /.* script: main.app secure: always http_headers: Strict-Transport-Security: 'max-age=63072000; includeSubDomains; preload' and another subdomain, served by the another submodule ( static.yaml ) has the following: handlers: - url: /

Adding HSTS headers in app.yaml (Google App Engine)

蓝咒 提交于 2021-02-19 03:42:05
问题 I have the following handlers section in my app.yaml : handlers: - url: /(robots\.txt|sitemap\.xml) static_files: \1 upload: (robots\.txt|sitemap\.xml) secure: always http_headers: Strict-Transport-Security: 'max-age=63072000; includeSubDomains; preload' - url: /.* script: main.app secure: always http_headers: Strict-Transport-Security: 'max-age=63072000; includeSubDomains; preload' and another subdomain, served by the another submodule ( static.yaml ) has the following: handlers: - url: /

CSS File not loading into PHP Laravel application with Google App Engine and runtime php72

跟風遠走 提交于 2021-01-29 13:02:22
问题 I try to run a standard installation of a Laravel 5.8.x application with its own CSS file on the Google App Engine with standard configuration (runtime: php72). The page is displayed, but the CSS file public/css/main.css is not loaded. There is a 404 error in the browser. This is my app.yaml code: runtime: php72 service: default env_variables: APP_KEY: xxxxx APP_STORAGE: /tmp VIEW_COMPILED_PATH: /tmp APP_ENV: production APP_DEBUG: false CACHE_DRIVER: database SESSION_DRIVER: database ... I

502 Bad Gateway while deploying in GAE

笑着哭i 提交于 2021-01-29 09:23:21
问题 I am trying to deploy my nodejs application in Google App Engine. But I keep on getting 502 Bad Gateway when I run $ gcloud app browse This is my file structure ->project |___node_modules |___models |___routes |___index.js |___app.yaml |___package.json |___package.lock.json |___public |___index.html |___js This is my app.yaml file env: flex runtime: nodejs threadsafe: true manual_scaling: instances: 1 # Handle the main page by serving the index page. handlers: - url: / static_files: public

Multiple Services in Google App Engine Python 3.7

眉间皱痕 提交于 2021-01-28 08:30:10
问题 I have an application that ran fine under the Python 2.7 Standard framework, and runs fine as two separate applications in the 3.7 framework, but I can't figure out how to configure them as a single application with two services. main.app consists of the following two lines (paralleling what used to work in the 2.7 framework) from app import app from update import update The app.yaml for main consists of nothing but runtime: python37 Each of the two python packages under main (app and update)

redirect all requests from one domain to another with Google App Engine but keep static routing rules in yaml

拥有回忆 提交于 2020-12-05 11:33:05
问题 I have a GAE app serving static files defined by rules in the yaml file under two different domain names as configured in DNS, an old one and a new one, but otherwise it's the same content served for each. I'd like to redirect requests from the old domain to the new domain. I've seen this question, but that loses the ability to use the static asset handlers in the yaml from what I can tell, and would have to set up static asset serving explicitly in my main.py I think. Is there a simple way

Deploying Django channels app on google flex engine

天大地大妈咪最大 提交于 2020-02-25 04:15:48
问题 I am working on django channels and getting problem while deploying them on google flex engine,first I was getting error of 'deployment has failed to become healthy in the allotted time' and resolved it by adding readiness_check in app.yaml,now I am getting below error: (gcloud.app.deploy) Operation [apps/socketapp-263709/operations/65c25731-1e5a-4aa1-83e1-34955ec48c98] timed out. This operation may still be underway. App.yaml runtime: python env: flex runtime_config: python_version: 3

Google App Engine - PHP App Images/CSS not found

a 夏天 提交于 2020-01-17 06:59:22
问题 I'm building my first app using Google App Engine and have hit a problem straight off: My images and css are not loading with the error: Failed to load resource: the server responded with a status of 404 (Not Found). I have done all I can think of to try and tackle it, and now I'm stumped. Here's my code: PHP: <?php echo "<html><header><link rel='stylesheet' type='text/css' href='/stylesheets/style.css'></header> <body> <div class=header><img src='/images/logo.png'> </div><div class=main

cron job in google app engine not working

ぐ巨炮叔叔 提交于 2020-01-09 11:43:25
问题 I have taken the basic python 3 tutorial website on flask from this google cloud tutorial and I am able to set this up and the website works just fine. In addition , I also wanted to run a python script which runs everyday to collect some data, but the cron job just doesn't work. I also added login: admin to restrict anyone to directly use that url cron.yaml cron: - description: test dispatch vs target url: /cronapp schedule: every 5 hours app.yaml runtime: python env: flex entrypoint: