now nginx has a list headers_in in ngx_http_request_t, my requirement to is do some change for example encoding to one of the header, I need do this in source code, it seemes a little like the proxy_set_header command in configuration. Directly set value in the table_elt_t seems rude, Does any one has any idea?
How to edit the request header in nginx and then send to backend?
763 Views Asked by Hintom At
1
There are 1 best solutions below
Related Questions in NGINX-REVERSE-PROXY
- nginx set up reverse proxy from subfolder to a port
- Openshift nginx proxy_pass not redirecting from current host to another
- Load balancing using NGINX between sites that are in different docker-containers in the Portainer environment
- Extracting and Storing Value of a Initial Header in NGINX
- Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response, nginx, django, waitress
- Problem with Plex and Owncloud reverse proxies cohabitation
- Why Node.JS HTTP server doesn't work properly behind proxy?
- How to rewrite the name of a backend header with nginx as a forward or reverse proxy?
- Websockets stopped working after adding nginx and gunicorn
- self-hosted blazor web app - websocket/signalR works in public network, but does not work on home network when using domain name
- Error configuration for nginx-ingress controller
- How to resolve weird 404 error while connecting to php-fpm via nginx (reverse proxy) inside of a podman pod?
- nginx conflicting server name
- Nginx v1.25.1 http2 on; new recommendation creating another warn
- Combine Short-URL-Service with Existing CMS on Nginx
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can modifying the request header by adding a new header to the upstream request and including string captures. Here's a simple example that replaces
Mozilla/5.0withMozilla/6.0in the User-Agent header:Although, it sounds like you also want to apply some programatic transformation to your replaced header (you mention "encoding"), which I don't think is possible. There might be a different solution if you explain your problem in more detail with examples.