Google AppEngine对所有url请求不区分大小写怎么办? [英] Google AppEngine case insensitive for all url request how?

查看:78
本文介绍了Google AppEngine对所有url请求不区分大小写怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是参考以下问题.

在Google App Engine中关闭区分大小写的网址

我正在尝试将Appengine用作CDN.在不考虑大小写敏感的情况下,在页面中访问javascript和css的地方编写了很多代码.我的App文件如下所示.

I am trying to use appengine as CDN. There is a lot of code written where javascript and css is being accessed in pages without considering case sensitivity. My App file looks like below..

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

问题是我想使主题都区分大小写.那么,在tolowercase.py中应该进行哪些修改?

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

我也不了解第一个解决方案,因为我不了解在appengine中添加中间件的情况(请原谅我的无知)

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.

这篇关于Google AppEngine对所有url请求不区分大小写怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆