http-headers

HTTP Headers for Chrome

梦想与她 提交于 2019-12-08 05:43:54
问题 I'm attempting to allow the user to download a file, and it is working perfectly in Firefox. My problem becomes that in Chrome, it doesn't seem to accept the file name that I give in the header, it simply ignores it and creates something of its own, and I'm noticing that its sending double headers, which are identical. HTTP/1.1 200 OK Date: Tue, 11 Feb 2014 16:25:19 GMT Server: Apache/#.#.## (Linux OS) X-Powered-By: PHP/#.#.## Cache-Control: private Pragma: public Content-Description: File

How to protect secrets properly?

↘锁芯ラ 提交于 2019-12-08 05:25:15
问题 I am using HERE api in both frontend and backend. If I try to put my app_id and app_code into the frontend code, it will be available to anyone seeing my site. I can try to create a domain whitelist and put my domain in this. But still, if I set the HTTP header "Referer" to my domain, I am able to access the API from any IP. So, what do I do? 回答1: The Difference Between WHO and WHAT is Accessing the API Server Before I dive into your problem I would like to first clear a misconception about

HTTP_IF_MODIFIED_SINCE header not passed to Rails app (Nginx, Passenger)

[亡魂溺海] 提交于 2019-12-08 04:28:22
问题 I am trying to use the HTTP_IF_MODIFIED_SINCE header in my app to determine if resources are stale/fresh and render 200/304 in those cases. In my dev environment everything works fine but I can't for the life of me get it to work in production. I am using Passenger 3.0.11 and Nginx 1.0.13. As you see below, I tried proxy_pass_header, proxy_set_header, passenger_pass_header and passenger_set_cgi_param. The last one actually sets a HTTP_IF_MODIFIED_SINCE header but it is empty... Any help/ideas

How to know from which email client the HTTP request was coming from? [duplicate]

為{幸葍}努か 提交于 2019-12-08 04:21:52
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Email client detection I have a newsletter which will have a link to my websites pages. Now i want to know which email client (gmail, hotmail, outlook) the user opened the newsletter in and clicked the link to the website page. The reason I want to know which email client, is because i want to customize the content in website pages based on the use of email client by users. My Website pages will be coded in PHP

Passing Custom Headers to Selenium from Capybara

安稳与你 提交于 2019-12-08 04:19:31
We use custom headers to authenticate our web apps. An http proxy service intercepts requests, confirms the authenticity of the user and then injects custom headers into the request. In order to test the app, I need to write those headers into the request before it hits my ApplicationController methods. Right now, the current hack works for all my non-javascript tests: # in hooks.rb Before do require 'capybara/driver/rack_test_driver' module Capybara::Driver class Authentic < RackTest def env super.merge('My-Custom-Header' => "foo") end end end Capybara.register_driver(:authentic) do |app|

AWS API signed POST request with Javascript

一世执手 提交于 2019-12-08 03:54:53
问题 What I'm trying to do: Ultimately: I want to populate an AWS Kinesis stream from a browser extension (Safari, Chrome). I need to send the request to AWS using a signing process (v4); this involves setting headers and encrypting them (on a distant server with the aws secret key) to finally join those to the request. Amazon requests the header "Host" to be explicitly defined… However Javascript strictly disallow setting it (and a bunch of others, for good reasons) I must be missing something

HAProxy manipulate string prior to map lookup

孤人 提交于 2019-12-08 03:20:20
问题 I am pretty new to HAProxy but have the need for what seems like a fairly uncommon requirement. I need to lookup an item in a map based on the host header but I need to apply some string manipulation first. Example: Request comes in for i.domain.com I need to strip off the i. and lookup domain.com in my map. I can do this by creating a new, temp header with the value from the initial request and then replacing that value with some regex like so: http-request set-header X-Temp %[req.hdr(host)]

Advice on HTTP authentication scheme (using request headers)

允我心安 提交于 2019-12-08 02:41:45
问题 I have a rails app hosted on Heroku that am restricting access to by using a proxy service. The external server acts as intermediary for all requests and handles user authentication. Once a user has authenticated, the server (I think LDAP) adds the user name to the request header and redirects them to my app. I would like to use the username from the request header to authenticate users in my app. Basically if the user doesn't exist I would create a user with that username (no password

Check if a website is making X http request with javascript

房东的猫 提交于 2019-12-08 02:31:17
问题 I've been searching for a while but all I could find was examples on how to actually make those requests... What I'm trying to do is to check if a website is making an http request after I click a button to X site Ex. http://test.s3.amazonaws.com/test/1.txt I'm guessing there a way to get all the outgoing requests and then filter the list but I can't even get the requests What I've done so far is just inserting the eventlistener to check that X button has been clicked and then is when I'd

How can i modify the host header

Deadly 提交于 2019-12-08 02:09:48
问题 I am trying to develop a chrome extension that would set the "host" header on certain requests. But the documentation is contradicting as to if the "host" header can be modified or not. Both of these issues indicate that a) it should not be possible and b) it is impossible https://code.google.com/p/chromium/issues/detail?id=154900 https://code.google.com/p/chromium/issues/detail?id=158073 Yet multiple extensions in the gallery state they do modify the "host" header. e.g. https://chrome.google