开发者

Does Google App Engine have any support for cookieless domains?

开发者 https://www.devze.com 2023-01-08 11:46 出处:网络
It seems like static files can only be served from the same domain as the app. I could create a new app for hosting static files but I\'m a little nervous that that would a vio开发者_StackOverflow社

It seems like static files can only be served from the same domain as the app.

I could create a new app for hosting static files but I'm a little nervous that that would a vio开发者_StackOverflow社区lation of the terms of service.


You don't need to serve your static content from a different app, you just need to use a different hostname. App Engine makes it pretty easy to have many different hostnames that point to the same app.

With wildcard subdomains you don't even have to create a DNS entry. If your app lives at myapp.appspot.com, you can also reach it through any subdomain, like static.myapp.appspot.com. If you're using your own domain, you'll need to configure it manually.


"4.4. You may not develop multiple Applications to simulate or act as a single Application or otherwise access the Service in a manner intended to avoid incurring fees"

"You may not develop" but, you can "Enable Billing" for multiple application. An example:

1) mysite.appspot.com
2) mysite-static.appspot.com
3) mysite-data-service.appspot.com


Section 4.4 of the terms of service prohibit one from splitting one logical app into two pieces - so hosting your dynamic content and static content in two separate GAE apps would violate the terms.

However, you could host static files on another web hosting service - anything from a simple shared hosting solution all the way up to a big CDN. This approach enables your site to serve static content from domains other than your app's domain.

0

精彩评论

暂无评论...
验证码 换一张
取 消