expressjs/cors

Add ability to omit `Vary: Origin` header

开放

#317 创建于 2024年3月21日

 (6 条评论) (0 个反应) (0 位负责人)JavaScript (476 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (5,897 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Hello! Thank you to the authors and maintainers for this important package.

We have an issue where we would like the ability to conditionally omit Vary: Origin as a header. In our use case, we have specific routes for which the responses does not vary based on the requesting origin, e.g. a route for vending static image content.

Without this functionality, we are unable to use Cloudflare Polish1, which only accepts Vary: Accept-Encoding2, short of effectively rewriting all the cors code minus the Vary: Origin header.

Would this repository be able to add this functionality, or accept a patch to allow conditionally removing this header based on the requested routes?

Thank you again!

Footnotes

  1. https://developers.cloudflare.com/images/polish/

  2. https://developers.cloudflare.com/images/polish/cf-polished-statuses/

贡献者指南