568 questions
1
vote
0
answers
8
views
Express-session does not set cookies for request headers and response headers when deploy nodejs
I got struggle when I deploy my backend with EC2 and the domain after deploy is http://52.xx.xx.xx:8080. I can not set cookies for request header.
The flow is that
When the user clicks on "Login&...
1
vote
1
answer
50
views
Override default UTC time on static resources [duplicate]
I have set up static resource serving with SpringBoot like so:
@Configuration
@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(...
1
vote
2
answers
71
views
How do I get Backblazen B2 to respond with Access-Control-Allow-Origin?
I'm trying to fetch an image using JavaScript from a Backblaze bucket that is set to allPrivate.
I have a correct authorization code that works if I fetch the image like this:
echo '<img src="'...
0
votes
1
answer
33
views
How to Manage HTTP Response Headers in Apache for a Magento Site?
I want to update headers like Cache-Control, Expires, and Pragma, but I'm facing issues even after making changes in my .htaccess file.
Current Configuration:
I've added the following to my .htaccess ...
-3
votes
1
answer
50
views
.css and .js was blocked due to MIME type mismatch
My HTML is being rendered as a string.
This is how I set my headers.
@app.after_request
def apply_caching(response):
response.headers["Content-Type"] = "text/*"
response....
1
vote
1
answer
84
views
HTML5 Audio player in R Shiny app goes to beginning of track when setting currentTime
I have created an audio player using R shiny which creates an audio player like this:
tags$audio(
src = "song.mp3",
type = "audio/mp3",
controls = "controls&...
0
votes
1
answer
45
views
How to manually add response Access-Control-Allow headers to preflight requests
I have an express server ("express": "^4.19.2") set up and use this custom function to add response headers:
const allowCORS = (req: Request, res: Response, next: NextFunction): ...
0
votes
0
answers
46
views
How do you get the object metadata for an S3 Bucket object when querying from javascript
I am getting an object from an S3 bucket using the GetObject command. I want to query some user defined metadata on the object.
I can see that the metadata is included in the response headers but I ...
0
votes
1
answer
117
views
"Best" way to inject a Livewire component into the response with Laravel middleware
I want to add a Livewire component to every request using middleware rather than having to manually add the component. I've done a bit of research and have looked at Spatie's Laravel cookie consent ...
0
votes
0
answers
30
views
PDF uploaded within a folder downloads when viewed on phone browser - I want to change that to View
Noticed that when I click on a direct link to a PDF (mysite.com/resource/flyer.pdf) on my phone it downloads and then gives an option to view (Would you like to open the downloaded file?) instead of ...
0
votes
1
answer
132
views
ASP.NET Core 6 Web API : missing "Allow-Control-Allow-Headers" headers in response
In my ASP.NET Core 6 Web API, I enabled CORS following this article: MS article.
The API endpoint works, but there is no expected header Access-Control-Allow-Origin in the response:
API response ...
0
votes
1
answer
105
views
Cloudflare response headers not setting image/png
I have a Next app with an endpoint api/download?icon=UUID which downloads an png image.
In localhost everything is working fine, the problem is with the live version that uses cloudflare, the response ...
0
votes
1
answer
79
views
.NET Core json response differences between Chrome and Firefox
I wrote a Minimal Web API with this code:
app.MapGet("/api/getLogs", async (HttpContext context) =>
{
context.Response.Headers.ContentType = "application/json";
data =...
0
votes
1
answer
29
views
JBOSS appends charset=ISO-8859-1 in response headers
JBOSS v7.4 appends charset=ISO-8859-1 to my js files due to which browser throws "Unexpected token" error for files with special characters.
The same file loads correctly on Weblogic and ...
0
votes
0
answers
988
views
Uncaught (in promise) Error: `headers` was called outside a request scope. next.js14
when i go to chats page The page is not responding due to this error, and when I open the console, I find the number of errors increasing non-stop, and this sentence appears to me:
Uncaught (in ...
0
votes
0
answers
60
views
Unable to remove Cross-Origin-opener-Policy in MV3 chrome extension
The below code updates a few network request rules.
Now if you look at rule id 2 we remove certain headers. I can see all of the other headers removal taking effect but not the Cross-Origin-Opener-...
0
votes
0
answers
15
views
Access-Control-Allow-Origin is null even when set in web.config
We have a vulnerability reported in our application. Access-Control-Allow-Origin is reflecting the same origin value that is calling the resource.
It is happening because Access-Control-Allow-Origin ...
0
votes
0
answers
17
views
Flask: How to return the "Retry-After" header (flask.Response.retry_after ?) [duplicate]
I have a Python + Flask web app that serves files.
The file needs a time to be made, that may vary from few seconds to few minutes.
If a request comes and the file is not ready, the "Error 503&...
0
votes
1
answer
266
views
HeadersAlreadySentException: Headers already sent in Error in Yii2 framework
I encounter an issue where my Yii2 project are giving below error on hosting. Running fine on local.
Fatal error: Uncaught yii\web\HeadersAlreadySentException:
Headers already sent in/home8/nakkadka/...
0
votes
0
answers
34
views
Allow both `'Access-Control-Allow-Origin' '*'` and `Content-Security-Policy "frame-ancestors *"`
I have the following conf.d/prod.conf.
It does not raise Refused to display 'https://v10.frontend.tech/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. because of add_header Content-...
0
votes
1
answer
293
views
How to set up the link for the paginated files in the Get Rows(V2) Logic App connector and pass it via Azure API call?
I have created a Logic App and doing the pagination of the result retrieved by Get Rows(V2) connector. The threshold is set to 1500 and it is working fine. The test case file has 4484 records and the ...
0
votes
0
answers
82
views
Simple proxy to change Content-Disposition header (AWS Preferred)
I'm working on a use-case that involves retrieving files from an external source (out of my control) which serves them with a Content-Disposition header set to attachment. I would like to serve these ...
0
votes
0
answers
53
views
Remove server header in IIS 10.0 when the subfolders in the request path are more than the maxUrlSegments attribute (default value 32)
I have a situation in which I cannot control the response from the IIS when the request contains many subfolders that exceed the value of the maxUrlSegments setting (default = 32). See image:
In fact,...
1
vote
0
answers
40
views
Content-Disposition HTTP Header
A website returns JSON as response but the response header says the content-disposition type is attachment is there any specific reason for it..
I am creating a RestAPI should I do the same
does this ...
0
votes
0
answers
190
views
Duplicate response headers with same values in IIS 8
We are using IIS 8 for serving static contents and angular UI code for our website. Added some custom headers in web.config recently for security vulnerability fixes. After this change , each custom ...
0
votes
0
answers
44
views
Link rel="preload" not working for assets loaded within iframe
I have a page with a same-origin iframe. I know that iframe is going to need some CSS/JS assets so I issue Link headers to preload them from the page that contains the iframe.
Example of the header:
...
0
votes
0
answers
118
views
Using serve-handler to update custom headers
I'm trying to use serve-handler to make a custom response header to change the content-disposition.
Unfortunately I am a complete beginner so I am way out of my comfort zone and struggling to proceed ...
-1
votes
1
answer
820
views
Cargo website customize css for mobile only
My website looks good on desktop but on mobile version, the header is in a weird placement. How do i change the header font size and placement without it changing for desktop version.
Also my images ...
2
votes
1
answer
845
views
How to fetch response header data in nextjs?
In my nextjs app, i want to fetch response headers of this http request. i can see all response headers in browser's devtools in network section like this;
devtools
However, i cannot fetch them inside ...
0
votes
0
answers
72
views
How to get headers from response of a server route
The process will be like this:
The user will click a button and they will receive an Email. Within the email, there is a link that will send a GET request to the server. The server will then route to ...
0
votes
1
answer
132
views
Where are the exposed headers informing my Rate Limit for the Geni API?
Anytime I use the Client Side Flow to authorize my Geni app with OAuth2, I can successfully get it to authenticate me but I receive the error:
{"error":{"type":"ApiException&...
1
vote
1
answer
74
views
Why did my menu disappear when I added styles for my carousel?
I tried to create two CSS files but it doesn't work. I have joined below my code, HTML, header CSS and Carousel CSS and javascript to create a responsive header.
From the screenshot I have sent can ...
0
votes
0
answers
169
views
Adobe Target: Unable to load all site elements in the editor
I'm in the process of migrating to Adobe Target for our A/B testing solution. I have Target successfully installed via Adobe Data Collection. However, not all the page elements load in the editor when ...
4
votes
1
answer
869
views
Open Api generator doesn't add any information about response headers to generated code
I have following open api specification description:
openapi: 3.0.3
...
/foo:
get:
operationId: foo
parameters:
- name: bar
in: query
required: true
...
0
votes
0
answers
556
views
Error: Parse Error - Invalid header value char in Node.js
I'm encountering a "Parse Error: Invalid header value char" in my Node.js application. The error stack trace points to an issue in the TLSSocket.socketOnData function. I've checked my code, ...
0
votes
2
answers
163
views
How to extract headers.response value and use it in next request?
API request response.headers shows as below:
Headers([('server', 'nginx'), ('content-type', 'application/json'), ('content-length', '86'), ('content-encoding', 'gzip'), ('bd-tt-error-code', '0'), ('...
1
vote
0
answers
86
views
Unable to preserve HTTP/2 headers list when extracting frame using editcap. Hex Dump Matches
When I used editcap to extract a HTTP/2 Frame from a Captured PCAP using tcpdump, the HTTP/2 headers don't show up in extracted frame, but the Hex dump matches.
I am using the below editcap command to ...
1
vote
0
answers
660
views
Add headers in a route middleware in Nux 3
I'm migrating a Nuxt 2 to Nuxt 3 application and I need to add an header to the responses that arrive to a specific page.
While I'm aware on how to add named route middleware in Vue components, I'm ...
-1
votes
1
answer
433
views
Refused to apply inline style because it violates the following Content Security Policy directive for style-src
I've removed all the inline CSS from my application which were present before.
But still I'm getting error as "Refused to apply inline style because it violates the following Content Security ...
0
votes
1
answer
9k
views
In Chrome console: Error with Permissions-Policy-Report-Only header: Feature fullscreen's parameters are ignored
How do I get the Permissions-Policy-Report-Only header to call the reporting endpoint?
I am trying to use this header to collect data from the browser, say when the unload event gets called or when ...
0
votes
0
answers
129
views
OpenMetadata set custom HTTP headers in web application
I am working on the OpenMetadata this moment. Seems like backend of the web application is written in Java. I am interested in, if I can set custom HTTP headers from UI ? Or it requires to change the ...
0
votes
1
answer
2k
views
next.js does a fetch instead of a redirect with a text/x-component content-type
I have a function in a next.js v13 app router app that ends with a redirect:
...
return NextResponse.redirect(redirectUrl.toString()
Instead of redirecting to a page, it instead informs the browser ...
1
vote
1
answer
84
views
Asp.Net MVC5 - how to remove ,,Server" header from static elements response (e.g svg files)
I'm trying to remove Server information from headers response in asp.net mvc5 application. I added following code to application, which take care for most of server responses:
protected void ...
-1
votes
1
answer
499
views
Ktor Response Headers showing null for Set-Cookies
I am making a Gradle KotlinJS App, and I am new to Kotlin. I am using Ktor to ping an API to log in, and from looking at the browser records, I am receiving the return token as a Set-Cookie in the ...
1
vote
1
answer
922
views
Set-Cookie doesn't set cookies (backend: nodejs, frontend: react)
I had a assignment where I had to implement Login / Logout functionality.
The app was very simple, so I used the very simple approach.
While I was working on localhost - everything went well)
But ...
0
votes
1
answer
401
views
JMeter - Extracting the 'code' from response header
I am trying to extract the 'code' from the response header of GET request. The code is needed to authenticate a sign in. I am able to extract the 'code'- however it only works about 50% of the time. ...
0
votes
1
answer
805
views
unable to remove x-powered-by and server headers for non-page resources (png, css, js, etc.) on ASP .NET Core web app in Azure
I have a web app running on ASP .NET Core in Azure.
The web config is as specified below.
When I view the page in Edge, and look at the headers for a web page, the X-Powered-By and Server response ...
0
votes
1
answer
111
views
Setting Headers in Response in ControllerBase vs ControllerClassHavingActualAPIs
I am currently working on an existing project which has below structure. In the APIs response header needs to be populated.
Controller folder
|
|---> ServiceControllerBase.cs
|---> ...
0
votes
0
answers
50
views
Getting NullReference Exception when trying to set this.Response.Headers
I have to set the "client-id" header in the API response.
I have below controller function which is implemented in a class ProtectionControllerBase.
"PolicyControllerBase : BaseClass&...
2
votes
1
answer
126
views
How to remove the ETag header from the response served by the FileServer
How Can i remove the "ETag" response header which is set in gobuffalo fileServer ?
I have tried creating a middleware function :
func RemoveETagHeader(next buffalo.Handler) buffalo.Handler {...