openresty / openresty/lua-resty-websocket

How to use client as a proxy?

Open
#13 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
523
Forks
112
Avg merge
1d 16m
Merged PRs (30d)
2

Description

Hi, I want to use nginx as as wescoket proxy, so I could hold the connection by nginx while my backend server restarting.

I wrote listen to a new port 8080, and newed a resty.websocket.client to connection my backend server, which listens to port 80.
our Api requests use http Authentication header to verify user, how could I proxy the whole header using the resty.websocket.client while connecting? how could I save the websocket requests while backend restarting, then reconnect to backend?

I am a newer for lua-resty-websocket. could you give me some help or docs?
Thx

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

No file, test, or concrete change is named; start from the resty.websocket.client entry point and the nginx listener described on port 8080. The requested behavior—forwarding the HTTP Authentication header and preserving or reconnecting WebSocket requests during a backend restart—needs a defined design and acceptance criteria before completion can be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
documentation, networking
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.