Legacy Knowledge Base
公開されました Jul. 2, 2025

Internet Explorer 11におけるPNGの互換性

Written By

Brian Suh

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

この記事は、ドキュメントライブラリ にアップロードされた PNG ファイルが、 DOM7009 を持つ IE11 で 表示されないという既知の問題を説明しています:コンソールでURLの画像 をデコードできない。

セキュリティ対策として、またブラウザで悪意のあるスクリプトが実行されるのを防ぐために、LiferayはMIMEスニッフィングから保護するために X-Content-Type-Options: nosniff HTTPヘッダーを送ります。

system.propertiesのデフォルト値です:

# Set this to true for the portal to send the "X-Content-Type-Options:
# nosniff" HTTP header to protect against MIME sniffing. Custom URLs can
# specified in the property
# "http.header.secure.x.content.type.options.urls.excludes" that allow for
# unhindered MIME sniffing.
#
http.header.secure.x.content.type.options=true

この動作は、Internet Explorer 8(、 Microsoftのドキュメント)以来、知られており、意図されています。

要約すると、サーバーがレスポンスヘッダ X-Content-Type-Options: nosniffを送信すると、script と styleSheet 要素は不正な MIME タイプのレスポンスを拒否します。

解決策

この動作を解決するには、2つの選択肢があります。 この2つのオプションのいずれかを設定する場合は、潜在的なリスクを認識した上で、ご自身の判断で行ってください:

オプション1

Disable X-Content-Type-Options: nosniff Liferay から送信されています。

  1. system-ext.properties で http.header.secure.x.content.type.options=falseを設定します。
  2. ファイルを保存する
  3. サーバーを再起動する

オプション2

MIMEスニッフィングを許可する正確なURLを定義してください:

  1. system-ext.propertiesファイルに、system.propertiesのdefaultプロパティに見られるように、MIMEスニッフィングを妨げないようにするカンマ区切りのURLプレフィックスを設定します:
    # Set a list of comma delimited URL prefixes that allow for unhindered
    # MIME sniffing. This property is only used when the property
    # "http.header.secure.x.content.type.options" is set to true.
    # http.header.secure.x.content.type.options.urls.excludes=
  2. ファイルを保存する
  3. サーバーを再起動する
Did this article resolve your issue ?

Legacy Knowledge Base