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
487 views
in Technique[技术] by (71.8m points)

vue.js - dispatch.yaml - Problem accessing Subdomain on App Engine Standard

I have the following static webpage that I have deployed on App Engine:

enter image description here

I am using Node.js runtime because the actual app I want to deploy is a Vue.js application.

When I deploy I am able to access the application on the default url that is provided by App Engine that looks like this https://dev-xxxxx.uc.r.appspot.com. The CSS is applied perfectly.

enter image description here

I have created a dispatch.yaml that maps the dev service to my custom subdomain dev.example.com:

dispatch:
   - url: "dev.example.com/"
     service: dev

but when i access the webpage using my custom domain the CSS isn't loaded.. does anyone know why this is happening or what I have missed? enter image description here

This is happening on Javascript files too hence my Vue.js app isn't loading when accessed via the custom domain.

question from:https://stackoverflow.com/questions/65851223/dispatch-yaml-problem-accessing-subdomain-on-app-engine-standard

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

1 Reply

0 votes
by (71.8m points)

okay i have figured it out, on the dispatch.yaml i had to add an asterisk, like so

dispatch:
   - url: "dev.example.com/*"
     service: dev

Not sure why it works...the only reason i can think of is the url uses regex to route.


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

...