Google App Engine(GAE)のwar/WEB-INF/web.xmlのメモ。
|
security-constraint要素によって、アクセス制限をかけることが出来る。
<?xml version="1.0" encoding="utf-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5"> 〜 <security-constraint> <web-resource-collection> <url-pattern>/ccc/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>admin</role-name> </auth-constraint> </security-constraint> </web-app>
「http://aaa.appspot.com/ccc/〜」にアクセスしようとすると、管理者でログインすることが求められる。
(Googleアカウントのログイン画面が表示される)