IT社畜犬くわっちょのはてな

青森の片隅で働く、フルスタックエンジニアに憧れる器用貧乏なIT社畜犬の遠吠え

2018-06-28から1日間の記事一覧

Tomcatだけで特定の画面だけBASIC認証を外したい時

正直、普通にHTTPサーバー側で制御しろという話なのだが...... web.xmlにこんな感じに security-constraint を2つ用意した上で必要なものをBASIC認証のレルムから外す事でできる。 <security-constraint> <web-resource-collection> <web-resource-name>no auth</web-resource-name> <url-pattern>/sample.html</url-pattern> <url-pattern>/hoge/*</url-pattern> </web-resource-collection></security-constraint>