Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
489 views
in Technique[技术] by (71.8m points)

How can I set up an SSL configuration in Namecheap for Angular deployed on GitHub Pages and Django deployed on App Engine

I am deploying my system, Angular frontend using GitHub and the whole backend in the Google Cloud Platform - App Engine, SQL, Elasticsearch etc. Https seems to be working properly between website and the client as I have checked in the GitHub settings Enforce HTTPS. However I am not sure whether I do a correct configuration between Angular app and my Django API which is deployed in the App Engine. Can anyone take a look at the configuration and confirm that everything is done correctly? I would like to do everything as safely as possible. User portal should be accessible from example.com and www.example.com and the Django API on App Engine from api.example.com and www.api.example.com. Besides, maybe you have any additional safety tips or advices on what else I could do to increase protection?

Namecheap:

enter image description here

Google App Engine:

enter image description here

enter image description here

UPDATE

enter image description here enter image description here

UPDATE with the configuration of backend and frontend deployed on Google App Engine

enter image description here enter image description here enter image description here

dispatch.yaml:

dispatch:

  - url: "api.example.com/"
    service: backend-service

  - url: "www.api.example.com/"
    service: backend-service

  - url: "api.example.com/*"
    service: backend-service

  - url: "www.api.example.com/*"
    service: backend-service

  - url: "*/*"
    service: frontend-service
question from:https://stackoverflow.com/questions/65829126/how-can-i-set-up-an-ssl-configuration-in-namecheap-for-angular-deployed-on-githu

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Your configuration looks fine but, I don't understand why www and naked domain are registered on custom domains for app engine, according your description the frontend will work with Github.

Also the * in the Name cheap records is not great idea, you can change this to only for the app engine domains www.api and api

Other security recommendation is to enable CORS on your django application, to prevent that unauthorized domains call your api.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...