Tomcat で特定の URL へのアクセスをブロックする方法

アトラシアン ナレッジベース

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。

このページの内容はサポート対象外のプラットフォームに関連しています。したがって、アトラシアン サポートではこのページの記載内容のサポートの提供は保証されません。この資料は情報提供のみを目的として提供されています。内容はお客様自身の責任でご利用ください。

目的

In some cases, you may wish to restrict access to a specific URL within your Atlassian Applications - for example, if clients are accessing a URL that causes load on the application server. If you don't have access to the reverse proxy (or are not using a reverse proxy) you can modify Tomcat directly.

tip/resting Created with Sketch.

This solution is only applicable for Atlassian Applications that run under Apache Tomcat - such as Jira, Confluence, Crowd.

ソリューション

  • Shut down the application, and backup your $application-install/atlassian-jira/WEB-INF/web.xml file
  • Locate this comment element at the end:

<!--
All session-config, mime-mapping, welcome-file-list, error-page, taglib,
resource-ref, security-constraint, login-config, security-role,
env-entry, and ejb-ref elements should follow this fragment.
-->

  • Add the following block inside the <web-app> element, after the comment block above:
 <security-constraint>
      <web-resource-collection>
        <url-pattern>/path/to/block/without/context/root/*</url-pattern>
        <http-method>GET</http-method>
      </web-resource-collection>
      <auth-constraint />
    </security-constraint>
  • Note that the context path should not be in the url-pattern. Multiple url-pattern elements can be added. For URL's with parameters, the wildcard is not used.


説明How to block access to a specific URL at Tomcat when the reverse proxy is unavailable or not used
製品

最終更新日: 2020 年 1 月 24 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.