Questions tagged [http-headers]
HTTP header fields are components of the message header of requests and responses in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.
644 questions
-1 votes
0 answers
161 views
How to configure OpenWebUi trusted header authentication with Apache and Kerberos?
I am trying to integrate OpenWebUi With a FastAPI multi-tenant gateway (layer2) behind Apache + Kerberos (layer1). Kerberos authentication works, and Apache successfully injects: X-Forwarded-User: ...
4 votes
2 answers
243 views
Puppetserver external SSL termination: custom headers formatting
I am trying to set up webserver (HAProxy) in front of puppetmaster (v8+) Got to the point of tinkering with custom headers and ran into a problem. Puppet Docs say: X-Client-Cert Optional. Should ...
0 votes
0 answers
140 views
How do I pass the "REMOTE_USER" apache environment variable to my javascript application running on the apache server?
I have apache 2.4 installed on an oraclelinux server. I have included the mod_auth_mellon extension and have configured it to use our corporate single signon server for login/out. So far when I open ...
0 votes
1 answer
165 views
IIS Reverse Proxy How to fix the location header
We have an IIS server running as a reverse proxy for terminology.hl7.org. Requests come in with a host of terminology.hl7.org, and redirected to an internal server at http://3.142.231.50/terminology. ...
0 votes
0 answers
114 views
Custom HTTP server with Godot 4.3 can't handle over 5 SSE connections
Since Godot does not have a built in HTTP server, but only a TCP server, I managed to write proper responses manually. Javascript, css and html load and work properly, you might say seamlessly. ...
0 votes
1 answer
145 views
IIS 10 Strict-Transport-Security - Stays Set to 0
I'm having issues setting the Strict-Transport-Security header to be any value other than 0. I've tried adding the following code to the Web.config: <add name="Strict-Transport-Security" ...
4 votes
2 answers
2k views
How to reject Host header if different than URL of request in Apache?
I have an Apache/2.4.6 (CentOS) server with multiple subdomains as ServerAlias in Apache VirtualHost. something like: <VirtualHost *:443> ServerName example.com ServerAlias a.example.com ...
1 vote
1 answer
184 views
How to stop Apache to return a wrong line before the HTML header breaking it
I use a simple site enabled to publish files in Apache: File: /etc/apache2/sites-enabled/contents.conf <Directory "/mnt/data/contents/"> Options FollowSymLinks ...
0 votes
1 answer
122 views
Best Practices for Caching a Paginated Blog Search Results Page with Varnish
How should a blog search results page be cached, considering it returns a list of 10 items with pagination (GET ?query=<search_term>&page=<number>) to navigate to the next page? What ...
2 votes
1 answer
474 views
How to make HTTP OPTIONS responses working for WebDAV with Apache2?
The HTTP OPTIONS request is an HTTP request type (like GET, POST) to web servers. It is optional as a helper, you can use it to programmatically find out what requests web servers understand. But you ...
-1 votes
3 answers
2k views
IIS 10: How to remove server and NET headers
The setup is as follows: Windows Server 2022 Standard with IIS 10. ASP .NET 4.8 based application, running with Integrated mode and Application Pool Identity. Im trying to remove the following headers:...
0 votes
0 answers
345 views
Can a 499 Error be caused by the server?
I am getting a 499 error on a particular api call (specifically only when the browser is Firefox). My research has shown the 499 error is caused by the client severing the connection with the api. ...
0 votes
1 answer
800 views
How does Nginx behind NAT know the original IP address of the client?
I have a virtualized router with public IP address assigned to it directly in proxmox. When i send a request to port 443 from a different network(from a browser) the router correctly portforwards it ...
0 votes
2 answers
2k views
Nginx add header in http-section with variable value set in location-section
In my nginx setup, I'm adding some http-headers globally within the http-section. One specific header however depends on a value that I only know after mapping the location block. When I add the ...
0 votes
1 answer
1k views
Apache 2.4 Read from request header and set the same in response header
I am using Apache 2.4.6 I wanted to check if a custom header X-CUSTOM-HEADER is present in the request, if yes then set the same header and same value to the response. If the header is not present in ...
-1 votes
1 answer
2k views
Nginx error "upstream prematurely closed FastCGI request while reading upstream" with generated file download
I just spent the whole day trying to figure out this error. We have a PHP script that generates a file for download. After upgrading nginx (1.16 -> 1.24), this script suddenly started randomly ...
0 votes
1 answer
677 views
Change server header on all endpoints (Flask + Nginx + Gunicorn)
I'm working on a Flask app that uses gunicorn and nginx and should hide its server header, so I managed to do it only for the homepage, like this: gunicorn.conf.py import gunicorn gunicorn.SERVER = '.'...
3 votes
1 answer
1k views
PHP post data lost with Transfer-Encoding: chunked; Apache regression?
I am moving a PHP application from an older CentOS 7 server with Apache 2.4.6 and PHP 7.3.33 (mod_php) to a newer Alma Linux 9 server with Apache 2.4.57 and PHP 8.0.30 (PHP-FPM). This is a back-end ...
-1 votes
1 answer
75 views
What are cons of websockets? [closed]
I mean why at first place polling and server events exist if websocket can not only solve the problems they are solving but also allow additional functionalities (like bidirectional nature). I guess ...
0 votes
1 answer
579 views
How do I add a header to a single static file in IIS 10?
Server is Windows Server 2016 I need to serve a single static file with a different header than all the other files (Cache-Control: max-age=15) A different answer gives the leaf XML node as: <...
0 votes
0 answers
71 views
Placement of HTTP Headers in VirtualHost Containers?
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" Header always set X-XSS-Protection "1; mode=block" Header always set X-Content-Type-...
0 votes
0 answers
2k views
Why does nginx as a reverse proxy not send Referrer-Policy header?
A bit of context : I'm using nginx as a reverse-proxy for a bunch of apps running in Docker containers. Among those apps there is Nextcloud (fpm), and the settings page complains about HTTP Referrer-...
1 vote
0 answers
571 views
Is there a Apache module can fully log HTTP requests, in a non processed way?
I'm looking for an Apache module that is able to log the RAW content of HTTP requests, unprocessed. Here is one example : POST https://foobar/ HTTP/1.1 Host: foorbar Connection: keep-alive Content-...
0 votes
1 answer
141 views
Nginx add_header Link not parsed by Lighthouse
I'm trying to investigate why Google isn't indexing some pages (allegedly, because they redirect) and, when using Lighthouse to check an example page, I see the following: Error parsing link header (...
3 votes
0 answers
597 views
Why is CloudFront failing to pass a header from the origin to the client?
I have CloudFront configured with an API Gateway origin. In the application accessed via API Gateway, my application responds to a particular request with a Content-Disposition header so that the data ...
0 votes
1 answer
397 views
Do ETags generated on upstream need If-None-Match check? (NGINX)
(Reposting my post deleted after a year of inactivity) Let's assume I use etag off (and if_modified_since off with add_header Last-Modified "" to not make redundancy) in NGINX and I generate ...
0 votes
1 answer
147 views
iptables string matching feasability; possible use with fail2ban
We have several Apache 2.4 web servers behind a load balancer and CDN front end - where HTTPS is terminated - we see the client IP in headers from the front end in the back end Apache logs. I'm ...
0 votes
2 answers
374 views
Apache/httpd 'Header set Server' is ignored/overridden
I am using this in a VirtualHost <IfModule headers_module> Header set ProcessingTime "%D" Header set Server "Apache 2.4" </IfModule> I can see that the ...
2 votes
1 answer
2k views
Apache GZIP for images - any reason?
JPEG, GIF, PNG and WEBP images are already compressed. Is there any reason to serve them up using GZIP compression, regardless of whether or not the client says it may accept GZIP compression? curl -H ...
2 votes
1 answer
4k views
Adding custom headers on error responses from haproxy
I have the following haproxy config that adds the access-control-allow-origin header on successful 200 requests with the below config. My problem is, when I hit timeouts or haproxy itself (not my ...
1 vote
1 answer
3k views
CORS access-control headers not visible in the response headers section of Chrome inspector
Using https://cors-test.codehappy.dev/ to test our test server's new CORS policy, we receive: These are the response headers received when making the request: access-control-allow-credentials: true ...
0 votes
1 answer
432 views
Caddyfile header directive unable to override file_server ETag
Invoking caddy run against the Caddyfile: http://localhost header ETag forcedValue file_server I expect curl -v http://localhost/Caddyfile to show a response with the ETag forcedValue. Instead, a ...
0 votes
0 answers
2k views
Content-Security-Policy frame-ancestors not working
I'm running an OpenLiteSpeed server and would like to only allow webpages that start with a specific url on my site (e.g. https://example.com/video/**) to be iframed by others. (I want to allow anyone ...
0 votes
1 answer
1k views
Writing a RewriteRule based on X-Forwarded-Host
I have an Apache webserver behind a load balancer which proxies request to Apache and have problem regarding configuring directories. Here is my scenario: Upper Load Balancer proxies request to ...
1 vote
1 answer
4k views
Nginx - No last-modified or Etag response header on HTML
I am facing a rather odd issue with my web server. The server is configured with Ubuntu 20.04, Nginx v1.22.1, PHP 8.0, and MariaDB to host my WordPress website. The issue is, the server is not sending ...
1 vote
1 answer
703 views
Cloudflare uncompressing, then re-compressing response bodies
I'm using Node.js/express and if I set the headers Content-Type: application/json Content-Encoding: gzip and send gzipped compressed bodies of JSON data, this works as expected - when not behind ...
2 votes
1 answer
835 views
Are HTTP Headers configured by the CDN or by the application?
This is kind of a theoretical question, and I guess it may be too broad or unclear. Foobar is an application serving users across the internet. It relies on a CDN to improve its resiliency, speed, etc ...
0 votes
3 answers
10k views
Nginx not working with domain/url that points to server IP
The configuration I have set (below) works for localhost but not for my domain. The goal is to access port 3000 externally with basic auth so only I can access it. When I go to localhost, it is ...
0 votes
1 answer
284 views
Apache include value of %{TIME_YEAR} variable in an HTTP response header
I'm trying to do something like the following: <If "%{IPV6} == 'off'"> Header always set Attention "you are using still using IPV4 in %{TIME_YEAR}, please blahblah etc" <...
0 votes
0 answers
2k views
How to set Access-Control-Allow-Origin for multiple origin domains with Tomcat?
An answer on SO to the same nice - and following guidelines - question but for Apache, how to set Access-Control-Allow-Origin entry header for multiple origin domains deals with .htaccess, checking ...
1 vote
1 answer
880 views
NGINX 302 redirect / proxy
I have an icecast server that runs on port 8000 however when I set up a proxy using NGINX I seem not to be able to make it look like it is the original server. I am wondering is there anyway to kinda ...
-1 votes
1 answer
104 views
What is the web server software announcing itself as "VDL/1.0"?
I am looking at an old web form located at: http://www.teleservices.lyon.fr/etat-civil/naissance/ Of course, it is obsolete, bogus, without TLS, etc. But I don’t recognize the web server publishing it....
1 vote
1 answer
3k views
What is this formatting in the "Bearer" Authentication token of a HTTP get
I came across a "Bearer" Authentication in the header of a HTTP request (I want to understand an API) that I want to replicate. This is the header field: authentication : Bearer ...
1 vote
0 answers
6k views
Nginx - remove HTTP Header from response
Hey guys. I have the following question: Is it possible to remove or change the value of a header that was added a few lines earlier? Here is the whole scenario: Setup my-website.com.conf ... server { ...
2 votes
1 answer
9k views
Which static file types does Nginx generate ETags for by default?
In modern versions of Nginx, the ETag is automatically generated for static file types, even if you don't specifically enable the etag on in your location blocks or otherwise: https://nginx.org/en/...
1 vote
1 answer
730 views
NGINX byte-range requests are enabled but Pocket Casts still reports invalid headers
My NGINX web server has byte ranges enabled via add_header Accept-Ranges bytes; and I can successfully get byte ranges of podcast episodes via curl: $ curl -I -r 200-300 https://konradhoeffner.de/...
2 votes
0 answers
740 views
Are servers allowed to add a Content-Encoding header based on filename, if there is no compression on-the-fly?
Problem Suppose we have a compressed archive on disk, e.g. file.tar.gz, which should be served as-is. The file is served with Content-Type: application/gzip, but for some reason the server also adds a ...
0 votes
1 answer
252 views
Apache sends corrupted header [duplicate]
I have configured a basic virtual host just to be able to list a specific directory on the server. For the local files it’s working perfectly, but one of the folder listed at the root is a symlink to ...
1 vote
0 answers
474 views
Set header for all except one location
I'd like to set a header on all page request except for one. I've tried the following: location ~ ^\/(?!allow-iframes) { add_header 'X-Frame-Options' 'DENY'; } This has some unexpected behavior. It ...
3 votes
2 answers
6k views
How can I remove an accept-encoding request header in nginx?
The recent update to zlib due to a security hole appears to cause a major problem when serving PHP-FPM 8.0 via nginx on Ubuntu focal. Any requests with a gzip encoding fail right at the start of the ...