Skip to content

[Bug]: Duplicate Server and Date headers from services without a gateway #3867

@jvstme

Description

@jvstme

Steps to reproduce

  1. Run the service:

    type: service
    gateway: false
    auth: false
    image: nginx
    port: 80
  2. Request the service and inspect the response headers.

Actual behaviour

The Server and Date headers are duplicated. One version is coming from the origin server, while the other is added by the in-server proxy.

< HTTP/1.1 200 OK
< date: Fri, 08 May 2026 14:25:57 GMT
< server: uvicorn
< server: nginx/1.29.8
< date: Fri, 08 May 2026 14:26:01 GMT
< content-type: text/html
< content-length: 896
< last-modified: Tue, 07 Apr 2026 11:37:12 GMT
< connection: keep-alive
< etag: "69d4ec68-380"
< accept-ranges: bytes

Expected behaviour

No duplicate headers, headers from the proxy overwrite headers from the origin.

dstack version

0.20.19

Server logs

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions