laurenhall1526-netizen commented on issue #64678:
URL: https://github.com/apache/airflow/issues/64678#issuecomment-4193472299

   Yeah, that makes sense. Looks like both Uvicorn and Flask are adding the
   Date header, which explains the duplication.
   We probably shouldn’t be setting it at the app layer at all—letting the
   server handle it should be enough. Might be worth checking where Flask is
   injecting it in this path.
   I can take a closer look if needed.
   
   On Mon, Apr 6, 2026, 4:23 AM saivarmaakireddy270-star <
   ***@***.***> wrote:
   
   > *saivarmaakireddy270-star* left a comment (apache/airflow#64678)
   > <https://github.com/apache/airflow/issues/64678#issuecomment-4191367294>
   >
   > It looks like the duplicate Date header is being introduced because it’s
   > being set at multiple layers (application + server/proxy).
   >
   > According to the HTTP spec, the Date header should only be set once, and
   > most servers (Node.js, Nginx, etc.) automatically add it. If the
   > application code also sets it manually, it results in duplication.
   >
   > *Suggested fix:*
   >
   >    - Remove any manual setting of the Date header in the application code.
   >    - Ensure that only one layer (preferably the server/proxy) is
   >    responsible for setting it.
   >
   > For example, in Node.js:
   >
   > // ❌ Avoid thisres.setHeader("Date", new Date().toUTCString());
   >
   > If a reverse proxy like Nginx is involved, you can also hide the upstream
   > header:
   >
   > proxy_hide_header Date;
   >
   > This should ensure only a single Date header is present in responses and
   > resolve the issue.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/airflow/issues/64678#issuecomment-4191367294>,
   > or unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/B7IHA43T6CXAC64F7PSKJRD4UNZQHAVCNFSM6AAAAACXL6QPQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOJRGM3DOMRZGQ>
   > .
   > You are receiving this because you are subscribed to this thread.Message
   > ID: ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to