2.0 KiB
2.0 KiB
id | title | challengeType | forumTopicId | dashedName |
---|---|---|---|---|
587d8248367417b2b2512c3b | helmet.ieNoOpen() を使用して、IE が信頼できない HTML を開けないようにする | 2 | 301584 | prevent-ie-from-opening-untrusted-html-with-helmet-ienoopen |
--description--
注意点として、このプロジェクトは Replit にある次のスタータープロジェクトをベースに構築されているか、または GitHub からクローンされています。
一部のウェブアプリケーションでは、信頼されていない HTML をダウンロード用に提供しています。 Internet Explorer の一部のバージョンではデフォルトで、あなたのサイトのコンテキストで、こうした HTML ファイルを開きます。 つまり、あなたのページのコンテキストで、信頼されていない HTML ページが悪意のある動作を始める可能性があります。 このミドルウェアは、X-Download-Options ヘッダーを設定して、そうしたファイルを開かないようにします。 これにより、IE ユーザーは信頼されたサイトのコンテキストでダウンロードを実行できなくなります。
--instructions--
サーバーで helmet.ieNoOpen()
メソッドを使用してください。
--hints--
helmet.ieNoOpen() ミドルウェアを正しくマウントする必要があります。
(getUserInput) =>
$.get(getUserInput('url') + '/_api/app-info').then(
(data) => {
assert.include(data.appStack, 'ienoopen');
assert.equal(data.headers['x-download-options'], 'noopen');
},
(xhr) => {
throw new Error(xhr.responseText);
}
);
--solutions--
/**
Backend challenges don't need solutions,
because they would need to be tested against a full working project.
Please check our contributing guidelines to learn more.
*/