[Vuejs]-Submitting form via Vue JS to Laravel getting error 419/500 deployed on Google Cloud

0๐Ÿ‘

โœ…

I finally managed to solve this by changing the content in app.yaml file for configuration to deploy on Google Cloud Platform โ€“ Google Application Engine (GAE).

I need to specify these in the app.yaml

STORAGE_DIR: /tmp
CACHE_DRIVER: database
SESSION_DRIVER: database

Below is the updated app.yaml.

runtime: php
env: flex

runtime_config:
   document_root: public

# Ensure we skip ".env", which is only for local development
skip_files:
 - .env

env_variables:
# Put production environment variables here.
APP_KEY: [app-key]
APP_LOG: errorlog
   #here i missed out
STORAGE_DIR: /tmp
CACHE_DRIVER: database
SESSION_DRIVER: database
   #until here
## Set these environment variables according to your CloudSQL configuration.
DB_HOST: localhost
DB_DATABASE: [db-name]
DB_USERNAME: [db-acc]
DB_PASSWORD: [db-password]
DB_SOCKET: "[my-db-socket-name]"

beta_settings:
# for Cloud SQL, set this value to the Cloud SQL connection name,
# e.g. "project:region:cloudsql-instance"
cloud_sql_instances: "[my-db-instance-name]"

The error happened because the application session is not set to database and it is not able to send the request with the correct session.

Leave a comment