Questions tagged [http-headers]
In the Hypertext Transfer Protocol (HTTP), HTTP header fields contain the operating parameters of an HTTP request or response. With the request or response line (first line of message), they form the message header.
11,386
questions
0
votes
0
answers
11
views
Python send POST with header. There seems to be an empty header
I try to build a python script who sends a POST with parameters for extracting the result. With fiddler, I have extracted the post request who return that I want. The website uses https only.
POST ...
0
votes
2
answers
16
views
nginx should add parameter if special header is present
is there any simple way with nginX to add a parameter to the path ?
I am new to nginX and a bit confused with the configuration anyway. (long term Apache user) :
Example what I am trying to do:
...
0
votes
0
answers
6
views
how to pass custom header param to dash framework application base url
I have a flask app running at one end and a dash app both are running separately but I have a link in the flask app home on clicking which redirects to dash app but I want to pass some values such as ...
0
votes
0
answers
14
views
Set HTTP header x-frame-options: deny in nginx.ingress does not work
I try to set the Http Response Header x-frame-options: deny as:
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "X-Frame-Options: Deny";
more_set_headers &...
0
votes
0
answers
21
views
Getting ERR_RESPONSE_HEADERS_ MULTIPLE_CONTENT_DISPOSITION in Chrome while downloading
We have a react application and are trying to download files from the server.
We are facing flaky issues with respect to ERR_RESPONSE_HEADERS_ MULTIPLE_CONTENT_DISPOSITION while downloading when ...
0
votes
1
answer
30
views
How to capture the headers of a 401 response or request with js o react?
How to capture the headers of a 401 response or request?
The server is returning this 401 to me since it needs a summary authentication, I need to create a hash to send it to the server from the MD5 ...
0
votes
1
answer
23
views
Is Django 500 error Invalid HTTP_HOST header a security concern?
I have a custom Django web app sitting behind an NGINX proxy server.
I am seeing occasional errors come through from my Django server with messages like
Invalid HTTP_HOST header: 'my.domain.com:not-a-...
-2
votes
1
answer
45
views
How can I override content type header of every responses for http.Client?
I've got a http.Client in go and I want it to update every content type for every response to application/json (even though it might not be the case) even before it process the response.
Which ...
0
votes
0
answers
30
views
User Agent missing error in ReactJS fetch api
I am using News API in ReactJS for fetching news using fetch API.
CODE FRAGMENT
const url = `https://newsapi.org/v2/top-headlines?country=in&category=${this.props.category}&pageSize=${this....
0
votes
1
answer
29
views
Okhttp 3: How to add header based on path parameter
In Okhttp, how to add a header that is based on serviceId?
One way would be to use url segments. But that is based on index. What if the serviceId is always not at same index in the path?
Is there a ...
-2
votes
1
answer
53
views
Angular HttpClient CORS Error With API Calls
I'm creating a web based platform with Angular that interacts with the Magic Eden API (documentation: https://api.magiceden.dev/).
Please keep in mind this is not my API, I'm merely making calls to it ...
0
votes
0
answers
15
views
Cookie is saved, but when I send a request, I get an un-logged-in status
I am writing a script to save a website locally. Specifically, I am trying to download articles from a website while logged in. However, when I run the following command, it saves the website without ...
-1
votes
0
answers
26
views
when i submitted the data,results submitted to db but i got this error in console [closed]
php
when i submitted the data, results are submitted to database but i got this error in my console.
HttpErrorResponse {headers: HTTP Headers, status: 0, statusText: 'Unknown Error', URL: 'http://...
0
votes
0
answers
24
views
Angular - How to read custom header in angular application which has sent by another server
I want to redirect user from one site (A) to another site (B), and when user will redirected from Site A to Site B, I want to add one custom header to identify that user has came from Site-A.
'Site-A' ...
0
votes
0
answers
14
views
Content-disposition inline + filename behaving unexpectedly in recent Chrome
We have a pdf preview option in our company's internal back office application. At some point in the past few months or weeks, it stopped working properly in Chrome. The file comes with a header: ...
0
votes
0
answers
27
views
Content-Type header property value quoting doesn't work with third-party server
Is it correct to quote the boundary property value of Content-Type header?
I have sent an http-request with two files to a third-party server and get the following response:
Boundary '--"38b14895-...
0
votes
0
answers
21
views
Chrome extension httpRequestHeaders with manifest 3
I'm updating a Chrome extension from manifest 2 to manifest 3.
I have some troubles with sending dynamic httpRequestHeaders.
It's possible to send these dynamic headers but some headers are blocked ie....
1
vote
1
answer
24
views
DotNetNuke Authentication cookie
I am trying to access an asps website and download a file through a job in .NetCore.
When I try to log in with the password and user name it is failing.
I made the same request through postman and it ...
0
votes
1
answer
35
views
Boundary value of the header Content-Type is not applied to Request Payload and causing trouble
According to this SO post the boundary value of the header Content-Type can be changed, MDN says the same too. But in my case it doesn't happen, I don't get it why.
When I inspect the console (Chrome, ...
0
votes
0
answers
17
views
laravel route cache header effected storing data in session
I applied the cache header in route middleware. issue is, I could not store data in session.
$request->session()->put('name', 'data');
Route::middleware('cache.headers:private;max_age=3600')-&...
2
votes
0
answers
30
views
Creating Http request or proxy authentication to access a site using a token
public void Setup()
{
_driver = Driver.GenerateWebDriver(browser, "local");
var network = _driver.Manage().Network;
network.AddRequestHandler(new NetworkRequestHandler
{
...
0
votes
1
answer
31
views
Json Server returns 404 with "put" or "patch", "get" works fine
Im changing the information (skills: SkillSet[]) from the server inside the component with a couple inputs, in the browser. I would like to decide with two buttons whether to update or not the server ...
0
votes
0
answers
27
views
How to cache a request for a while?
I have function that gives required request parameters such as API path, method, body, params and makes a request (the function uses JavaScript fetch function). There are some APIs that return big ...
1
vote
1
answer
28
views
Creating a group level variable using the GitLab API
I'm trying to automate the update of a group level variable via the GitLab API
I want to provide the value of this variable using a file. To do this I need to specify "variable_type=file". ...
-1
votes
2
answers
58
views
Passing Header Auth Bearer token as variable in Powershell Invoke-RestMethod
I have the below code, where i am trying to capture the access token and passing it as a variable in the Headers section for Bearer token, but looks like the $Token.access_token is not getting ...
0
votes
1
answer
31
views
How to cache ResponseEntity<Resource> in spring boot
I am trying to cache ResponseEntity in spring boot but unable to find a proper way to implement the same.
There are few examples where
return ResponseEntity.ok()
.cacheControl(...
0
votes
0
answers
10
views
pass header from node federation to sub laravel grapghql
I have a sub lighthouse graphql created by laravel and a gateway with node.
I send the header of authorization from the gateway to my subgraph but in sub grapgh is null how can I get it?
my schema is :...
2
votes
1
answer
80
views
Filter (echo/copy) request headers to response headers with regular expressions in apache and perform regex replacements
I have a requirement to send a response header by filtering the request header string in apache. To filter the string, a regular expression can be used.
The echo command is working fine to send the ...
0
votes
1
answer
46
views
Android: How inspect http(s) request headers?
I'm developing an Android application, it is like a browser, has a web-view and sends http(s) requests. For debugging purpose, I want to be able to see the requests sent and received by the ...
0
votes
0
answers
19
views
How is HTML Header 'X-Real-IP' created? [duplicate]
I'm using LAMP: With the PHP-function getallheaders() you get information about the browser requesting your script. The resulting array contains a header called 'X-Real-IP'. With using BURPs Intruder ...
0
votes
0
answers
43
views
Swift: Trying to get HTML response from MusicKit. Fails because of incorrect Authorization header
I'm new to Apple platform development, so hopefully I'm not missing anything obvious, but I can't seem to find anything on this.
I'm trying to use Apple's MusicKit service to get the JSON object for a ...
0
votes
0
answers
18
views
Chrome dev tools response encoded json
I am trying to read a http post request data using Chrome developer tools but both payload and response is encoded instead of Json format.
request headers:
Accept: */*
Accept-Encoding: gzip, deflate
...
0
votes
1
answer
65
views
Continue when HTTP authentication fails
I have created an app (backend and frontend) that is mainly used on a Windows intranet. I'm using Kerberos authentication to do SSO so that anyone logged in to Windows domain is automatically ...
0
votes
0
answers
26
views
CSP Headers - refused to apply a stylesheet in safari
I added some CSP headers for my site.
config.csp = {
default_src: %w('self' https: wss:),
base_uri: %w('self'),
child_src: %w('self' https:),
font_src: %w('self' data: https:),
...
0
votes
0
answers
12
views
Django: ERROR (EXTERNAL IP): Invalid HTTP_HOST header ... - Correct host but spam queries?
Sometimes I get a wave of errors like this:
[Django] ERROR (EXTERNAL IP): Invalid HTTP_HOST header: 'app.mysite.com'. You may need to add 'app.mysite.com' to ALLOWED_HOSTS.
The thing is, app.mysite....
-2
votes
0
answers
50
views
Why do I get CORS errors even though I have the correct headers?
I want to send an http put request to my php API to update a value but when I do so in an Angular application, I get a CORS error:
Response to preflight request doesn't pass access control check: It ...
1
vote
2
answers
46
views
Jetty is not sending the Content-Length header
I have a servlet in embedded Jetty that provides downloads for certain files.
The code I use is the following:
try{
File file = new File(filePath);
response.setContentLengthLong(file.length());...
1
vote
1
answer
79
views
Difference between X-Forwarded-For and X-Real-IP headers
I'm using Nginx as a reverse proxy.
What is the difference between these headers:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
In some ...
0
votes
0
answers
13
views
How to stop router will not include auto-generated trackingid in request headers?
In my nodejs project i included NestJs and it is working fine but i added trackingId-middleware in project and it is working as expected but in production it is not working as expected.
tracking-id-...
0
votes
0
answers
13
views
How to block of loading resources from domain2.com on my website with Content-Security-Policy? [duplicate]
is it possible to blacklist a Content-Security-Policy or it has only whitelist function?
i want to block domain2.com/1.js from loading on my website.
i know Content-Security-Policy and method to ...
0
votes
0
answers
23
views
Parse cookie and add to HTTP request as custom header
I have this Axios request:
public getData<ResponseEntity = any>(path: string, config?: AxiosRequestConfig) {
return this.axiosInstance.get<ResponseEntity>(path, {
headers: {
'x-...
0
votes
1
answer
56
views
Unable to set custom headers on AWS Amplify
I'm trying to set these headers for my app on Amplify but without success:
customHeaders:
- pattern: /*
headers:
- key: Cross-Origin-Opener-Policy
value: same-origin
- key: ...
0
votes
0
answers
59
views
Access to XMLHttpRequest at...... has been blocked by CORS policy
I know there are many responses about this issue but in my case I am running the server and the client side, I have changed the Access-Control-Allow-Origin in my header but still...
I have added the ...
1
vote
1
answer
21
views
How to properly send Etag back to web server in HTTP If-None-Match request header?
I'm trying to use caching correctly using HTTP Last-Modified and Etag headers. From what I can see, web servers send back an Etag with one of 3 formats:
A standard Etag, e.g. wAUL9rDkgMueFoa7ZLPa/...
0
votes
0
answers
20
views
I manually add `Content-Encoding: br` and it does not work
Using homemade proxy software that adds/removes headers as specified (yes, I violate proxy standards), I add Content-Encoding: br to a file in Brotli format served by the upstream:
docker run --net=...
0
votes
0
answers
20
views
Why do I get this error : Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
I am trying to create a simple registration using passsport-local and passport-jwt modules using the following code as my reister root/controller:
var passport = require('passport');
const User = ...
0
votes
1
answer
75
views
Headers for HttpRequest, Angular with Spring Boot
using Angular with an API built in Spring Boot.
I have a problem regarding sending a request with the headers with the associated JWT.
The problems seems to be that i don't send any headers at all to ...
0
votes
0
answers
33
views
mockmvc unable to retrieve headers set by WebSecurityConfigurerAdapter
I created a commons library with the intent of injecting headers into the response of every API call. I updated the WebSecurityConfigurerAdaptor and wrote a mockmvc test case to test/assert those ...
0
votes
0
answers
12
views
Why stream dosen't work when server is on HTTPs?
I have two servers; receiving server(1) runs on NodeJS, and the sender server(2) is on Python.
Server(1) code :
import {Storage} from "@google-cloud/storage";
this.post("/webhook",
...
2
votes
2
answers
62
views
Error No 'Access-Control-Allow-Origin' - Nodejs [closed]
I'm developing an api taking data from a json file that will be inside the project's local files.
I'm having a problem with requests on the front end to get the data, it's a cors error.
In the api I ...