Questions tagged [headers]

Probably not the tag you want, please use something more specific like http-headers or smtp-headers.

Filter by
Sorted by
Tagged with
13 votes
1 answer
46k views

proxy_set_header not working

/etc/nginx/sites-available/default server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; # Make ...
linux404's user avatar
  • 173
9 votes
1 answer
21k views

Chrome DevTools - Request Header Size

Is there a way to get the total size (in bytes) of the request header that the browser is sending to the server for each request?
stepanian's user avatar
  • 191
8 votes
2 answers
7k views

Cant connect to S3 with nginx

I'm trying to serve static and media files from the amazon S3 bucket but Nginx can't connect to it Here is the error I get <Error> <Code>AccessDenied</Code> <Message> AWS ...
bboumend's user avatar
  • 181
4 votes
1 answer
6k views

HAProxy - Add response header based on request host

I have a HAProxy set up to redirect traffic to a few internal servers. What I'm trying to do is to set some response headers, based on the request host. Unfortunately I can't get it to work. Current ...
elmo's user avatar
  • 55
4 votes
1 answer
3k views

Add proxy headers in named location using nested location regex

I'm trying to setup a WebSocket endpoint on my Rails API using Nginx and Puma. What I have (working but ugly) The following Nginx configuration works fine, however I feel like I could use something ...
Habovh's user avatar
  • 271
4 votes
1 answer
7k views

How to override "Content-Type" header with PHP script on Nginx

I have some php script which returns jpeg image(1x1 pixel) with content type "image/jpeg": // return image $image_name = 'img/pixel.jpg'; $image = fopen($image_name, 'rb'); header('Content-Length: ' ....
Максим Назарьев's user avatar
4 votes
1 answer
1k views

HTTP Debug method reveals Server header on IIS

Stuck with really weird problem and can't figure out how to handle it. So, I have asp web api application hosted in IIS 10. I use IIS Rewrite module with outbound rule which removes any Server header: ...
Igor V Savchenko's user avatar
3 votes
1 answer
749 views

Need help determining origin of spam email

As a quick background we have spam that is being sent out with our domain name. As a result we have added SPF record to our domain DNS, now obviously this will assist in making sure this spam is not ...
Jacob Sharkey's user avatar
3 votes
1 answer
5k views

Nginx on CentOS: How can I change the "Server" header?

I'm running Nginx on Centos6. For security reasons I'd like to change/remove the Server HTTP header contained in the response headers. For instance,nginx's default Sever header looks like:I'm ...
joejoe12's user avatar
3 votes
1 answer
1k views

Set environment variables from header for Ruby/Rails app hosted in Nginx/Passenger

I installed a server for Redmine, running with Nginx/Passenger. The server also hosts Gitlab and it goes well. I put some kind of SSO plugin for Redmine (which I found and installed) and it needs an ...
leguminator's user avatar
2 votes
3 answers
472 views

Is TCP header the same as TCP segment?

So, is a TCP header actually the same thing as a TCP segment? I was reading this page, where it reads near the end that: Even though it might seem they are, in most cases, when referring to the ...
Totem's user avatar
  • 145
2 votes
0 answers
113 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 ...
Bill's user avatar
  • 201
2 votes
0 answers
1k views

Nginx proxy_pass loses headers when using http2

I've encoutered a problem with nginx losing headers to backend when using http2 protocol on nginx(regular http to Wildfly 10 backend). The below config works when taking the http2 parameter away and ...
Henri Kotka's user avatar
2 votes
0 answers
244 views

Use different client IPs with mod_rewrite and mod_remoteip

I have a reverse proxy that my site points to to help with DDoS protection. I have mod_rewrite set to use a specific header provided by the reverse proxy in order to pull the actual client IPs instead ...
jswny's user avatar
  • 31
1 vote
2 answers
2k views

Postfix swallows Bcc header

I use the postfix 2.9.6 and use a milter to read the contents for my application. I am seeing Postfix swallows Bcc: header from the incoming emails and my milter missed just that Bcc header. Is there ...
Sathish Kumar's user avatar
1 vote
2 answers
3k views

Is it possible to fix corrupt LUKS header?

I just accidentally overwrote the LUKS metadata of my volume with a new LVM header. I have copy of the original LUKS header but can't find it. Just in case, I made a dd image of the first 10MB of the ...
zonko's user avatar
  • 11
1 vote
1 answer
440 views

LUKS Header - 30kB mysteriously missing

I have a disk containing (only) a LUKS encrypted volume. That was created on a bare drive with no partition table using cryptsetup v.1.6.1. When unlocked, I can check the size of the decrypted ...
Diagon's user avatar
  • 246
1 vote
1 answer
2k views

Linux header 4.9.0-11-amd64 is missing in debian

I am a software developer and have only a basic understanding about Linux systems. We are in a migration phase from GCP to AWS and found that the Linux headers are missing while installing Cloud ...
Tismon Varghese's user avatar
1 vote
1 answer
983 views

set header in .htaccess not working if REQUEST_URI contains a word

I need to set some headers if REQUEST_URI contains the "compile" word. My uri is: http://myurl/compile/123456/123456?token=myvalue This is the code in the .htaccess that DOES NOT work: Header ...
Giacomo M's user avatar
  • 131
1 vote
2 answers
5k views

Redirect real IP client nginx

How to send to proxied server the real ip of client? My settings are: server { listen 80; server_name foo.example.com; location / { proxy_pass http://someip; proxy_set_header Host $host; ...
Meiram Chuzhenbayev's user avatar
1 vote
1 answer
7k views

Keeping Headers During NGINX Rewrite

I am attempting to set up an NGINX proxy to redirect all requests to one of two servers based on the contents of a query string argument. Essentially: https://my.site.com/api/...&server=a ...
JimmidyJoo's user avatar
1 vote
1 answer
6k views

setup SameSite=none value in Nginx webserver

I need to setup SameSite=none value in Nginx webserver In case of using Nginx as main webserver and non reverse proxy will the below configuration work? Inside server block location { ...
Georg's user avatar
  • 11
1 vote
1 answer
207 views

Postfix MTA - Match string in header fields

I'm trying to block some spammer by filtering some fields in the mail header, but it isn't working. The spammer is adding random domains in the headers, but the "user" is always the same, like this: ...
Daichi42's user avatar
1 vote
1 answer
1k views

Ignoring forwarder IP in syslog-ng

We are getting syslog-ng feeds from a forwarder that we don't control. The issue is that they are using an older version (RHEL 6), and while they have keep_hostnames set to 'yes' (chain_hostnames to '...
jasonmclose's user avatar
1 vote
1 answer
1k views

Is https preventing a proxy from adding x-forward-for header?

I'm trying to troubleshoot an issue for a user of my service https://jsonip.com. Last week I enabled forcing 301 redirects for all http to https connections. The user I'm trying to help now was ...
Geuis's user avatar
  • 637
1 vote
1 answer
254 views

Doctype xml version definition

W3C DTD instructions include the following as the very first line of a (X)HTML document: <?xml version="1.0" encoding="utf-8"?> I acknowledge the importance of the DOCTYPE declarations that ...
Joonas Pulakka's user avatar
1 vote
0 answers
261 views

Configuring postfix to use SendGrid SMTP relay with fixed FROM address but need to append REPLY-TO of original sender

I have been trying to resolve for a couple of months using multiple different configurations. The local delivery to a Dovecot mailbox ([email protected]) keeps the original sender (sender@gmail....
kcfez's user avatar
  • 11
1 vote
1 answer
553 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 ...
RussellHarrower's user avatar
1 vote
0 answers
378 views

Apache: Setting response headers based on the existence of multiple response headers

We are attempting to enforce a set of non-cache headers in cases where a reverse proxy does not return any cache headers, in an effort to allow independent backend developers to set headers as they ...
Johan Karlberg's user avatar
1 vote
0 answers
609 views

Apache2 - Header directives are not working

I would like to enhance the security of my server, so I'm following a guide regarding server security. I'm new to the subject, therefore there are many things I struggle to understand and there is ...
DamiToma's user avatar
  • 113
1 vote
0 answers
3k views

Why doesn't nginx proxy_hide_headers directive work in this case?

I have an nginx server block like this, and I am trying to use the proxy_hide_header directive to hide the Content-Security-Policy response header from the proxied server because I am not running an ...
jonseymour's user avatar
1 vote
1 answer
4k views

Removing one cookie in proxy_pass of nginx

I'm trying to proxy_pass the whole request coming to my nginx to certain base URL to another upstream server removing server cookie. All other cookies, HTTP headers, the URL itself should be kept as ...
Alexey's user avatar
  • 49
1 vote
1 answer
170 views

X-XSS-Protection header not set for the HTML document even that it is enabled in config file

I enabled the X-XSS-Protection header in the web.config file: <httpprotocol> <customheaders> <remove name="X-Powered-By" /> <add name="X-XSS-Protection" ...
NunoF's user avatar
  • 11
1 vote
1 answer
1k views

Users with Google Proxy IPs

On my website, we log user IPs to ensure we're able to properly moderate and prevent abuse. We are aware of Proxies, such as Opera VPN, Tor, and others. However, I am not aware of Google itself having ...
Nuno's user avatar
  • 603
1 vote
0 answers
52 views

Office365 removes mail headers before send

We're sending mails using c# Mail library, we need to send specific headers to track them through external providers. We've tried some months ago and it worked, but now trying again before deploying ...
Marc's user avatar
  • 111
1 vote
1 answer
4k views

add_header 'Cache-Control' working only without location context

I've installed nginx/1.10.3 (Ubuntu) and changed the original config file so that it is only slightly different at the top of the http context: http { add_header 'Cache-Control' 'no-cache'; and ...
sorry's user avatar
  • 11
1 vote
1 answer
553 views

Which headers take precedence -- the ones set by Nginx or the application server's?

I'm using Nginx on CentOS with a Rails server. I'm confused about how headers get set. If Nginx sets headers and the applicatino server (Ruby on Rails in this case), which one wins out? I have this ...
Dave's user avatar
  • 204
1 vote
0 answers
1k views

Haproxy Nginx : How not to forward the local port?

I have haproxy which listening on ports 80 and 443 and behind Nginx listening locally on ports 8000, 8001, 8002 etc... By default, all works fine but when an application web made a redirect 301, it ...
Body's user avatar
  • 66
0 votes
2 answers
135 views

Files and their headers? [closed]

(I'm a dos guy , I always liked to view files in norton commander and see inside stuff etc) however over the years I've noticed that each file(well , most of) ( binary files ) has header : For ...
Royi Namir's user avatar
0 votes
2 answers
928 views

Block all requests except certain header

I'm using CloudFlare in a shared environment and I'm trying to help block non-CloudFlare users who circumvent to my origin IP. Loading up the web page I see the header server: "cloudflare". So I ...
Aaron's user avatar
  • 11
0 votes
3 answers
430 views

UDP pseudoheader

Is it true that in the UDP header 2 bytes store a checksum for verification purposes by the destination host, and that this checksum is generated from a pseudoheader? If this is true, then why does a ...
Wintermute's user avatar
0 votes
1 answer
238 views

Postfix header_checks with multi-line headers and capture group

We have a header_checks regexp passed to the "cleanup" process, but it's not processing the header as a single header if it's on multiple lines. header_check (pass value of header to FILTER):...
reactive-core's user avatar
0 votes
2 answers
14k views

How to add http host header in URL?

I have web app deployed in K8 in aws & configured LoadBalancer to call the same from internet. In the Postman I call like , GET https://myteams.myorg.net/config Headers: Host doom.myteams.myorg....
k8dev's user avatar
  • 1
0 votes
1 answer
153 views

Multipart text/html email from Invision Community not parsing correctly [closed]

First of all, yes I have contacted Invision Community support. Yes, I am a paying user with an active license. We went back and forth for several hours and all they have to say is there's nothing ...
Krydos's user avatar
  • 11
0 votes
1 answer
3k views

Alter Nginx reverse proxy cache header from Public to Private

I have an Nginx cache server getting content from an origin server, the origin server sets Cache-Control to Public so my Nginx cache server can cache the content and make less requests to origin. But ...
adrianTNT's user avatar
  • 1,139
0 votes
2 answers
4k views

add_header not working in Nginx location

So, I've been trying to figure this out for the past 8 hours, but it seems I'm stuck... I have the following Nginx config file: server_tokens off; upstream php-handler { server unix:/var/run/php5-...
Tony's user avatar
  • 269
0 votes
1 answer
1k views

Pros/Cons to disabling HEAD requests with Nginx?

I have a static blog/site and I'm wondering if there are any negative implications of disallowing/disabling HEAD requests within my Nginx conf? For example: would it break the site with certain web ...
user421703's user avatar
0 votes
0 answers
97 views

comparing __FILE__ with $_SERVER['SCRIPT_FILENAME'] before sending header

I am new to PHP, I saw a code which has the following lines, what is the code trying to de here. if (basename(__FILE__) === basename($_SERVER['SCRIPT_FILENAME'])) { header("Location: https://...
Abdulrahman Hocaoglu's user avatar
0 votes
0 answers
32 views

Nginx Routing to Upstream Based on Cookie or Header Value

This one is bugging me and it should work but I must be missing a nuance somewhere: #== UPSTREAMS == upstream server_vip { server superduper.com:443; } upstream server_alt_vip { server ...
David Turner's user avatar
0 votes
0 answers
17 views

Remove 'Server' header in IIS 10 [duplicate]

Our compliance department wants us to remove the 'Server' header when someone hits our server via IP address. I don't know how to accomplish that, can someone help? To be clear, I know how to do this ...
Jose's user avatar
  • 167