Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is having dot as first character in static file directory not allowable in Google App Engine

Currently, I have the following config file in Google App Engine

application: jstock-affiliate
version: 1
runtime: python27
api_version: 1
threadsafe: true
auto_id_policy: default

handlers:
- url: /.well-known
  static_dir: .well-known

- url: /static
  static_dir: static

- url: /.*
  script: main.application

libraries:
- name: webapp2
  version: latest

When I access the following URLs in my local, both works fine

http://localhost:9080/.well-known/a.txt - OK
http://localhost:9080/static/a.txt - OK

However, after I deploy to Google App Engine, it is not fine for folder .well-known

http://jstock-affiliate.appspot.com/.well-known/a.txt - ERROR
http://jstock-affiliate.appspot.com/static/a.txt - OK

I need a dot as the first character in the folder name, due to https://medium.com/google-cloud/let-s-encrypt-with-app-engine-8047b0642895

May I know how I can resolve this issues?

like image 331
Cheok Yan Cheng Avatar asked Nov 08 '22 23:11

Cheok Yan Cheng


1 Answers

It seems that Google App Engine has problem creating folder which starts with dot. The following config will help

handlers:
- url: /.well-known
  static_dir: well-known

Folder well-known need to be created, instead of folder .well-known.

like image 169
Cheok Yan Cheng Avatar answered Nov 14 '22 22:11

Cheok Yan Cheng