Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

dstack-ingress: add WebSocket proxy support

Open Beginner friendly
#87 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
docker, nginx

Research direction

Find the entrypoint containing setup_nginx_conf() and inspect how it generates the nginx location / block. Add the requested WebSocket proxy settings there, then verify that WebSocket requests receive a 101 Upgrade response while regular HTTP traffic continues to work.

Written by the indexing model from the issue text.

Description

The kvin/dstack-ingress:wildcard image generates its nginx config via setup_nginx_conf() in the entrypoint, but the location / block is missing WebSocket upgrade headers. Without these, any WebSocket service behind dstack-ingress gets HTTP 200 instead of 101 Upgrade.

Suggested fix: add these three lines to the location / block in setup_nginx_conf():

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

This is safe for mixed HTTP + WebSocket traffic. $http_upgrade is empty for regular HTTP requests, and upstreams ignore Connection: upgrade when there's no valid Upgrade value. proxy_http_version 1.1 is strictly better than the default 1.0 (also enables keepalive). This is the standard nginx pattern recommended in the nginx WebSocket docs.

Current workaround: override command in docker-compose to patch the generated config before starting nginx:

command:
  - bash
  - -c
  - |
    sed -i '/proxy_pass/a\        proxy_http_version 1.1;\n        proxy_set_header Upgrade $$http_upgrade;\n        proxy_set_header Connection "upgrade";' /etc/nginx/conf.d/default.conf
    exec nginx -g "daemon off;"
Dominant language
Python
Stars
27
Forks
26
Avg merge
1d 6h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Dstack-TEE/dstack-examples

All issues in Dstack-TEE/dstack-examples

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.