开发者

Google AppEngine case insensitive for all url request how?

This is with reference to following question..

Switch off case sensitive URLs in Google App Engine

I am trying to use appengine as CDN. There is a lot of code written where javascript and css is being accessed in pages w开发者_如何学Goithout considering case sensitivity. My App file looks like below..

 handlers:
- url: /themes/([^A-Z]+)
  static_files: themes/\1
  upload: themes/.*
- url: /.*
  handler: tolowercase.py

The problem is I want to make even themes as case insensitive. So what should be modification in tolowercase.py?

Also I didn't understand the first solution as I don't know about adding middleware in appengine (pardon my ignorance here)


There's no way to serve static files with different capitalization than they were uploaded with - you'd need to upload them as app data instead, and serve them through your app.

Fixing your app to use the correct capitalization everywhere would be a much better idea.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜