http-headers

What is “GET http://httpheader.net 301” in my nodejs app?

牧云@^-^@ 提交于 2019-12-24 18:09:43
问题 I see something like this in my nodejs app... Am I under hack attack ? GET http://httpheader.net 301 5.464 ms - 108 GET http://www.httpheader.net/ 200 6.820 ms - - Thank you very much 回答1: The link from support of httpheader.net says This is usually an indication that either the IP you are on had a proxy server at one time, your IP is being probed to see if it contains a proxy server or someone just has their software miss configured. These can usually be ignored as they pose no direct threat

Design decision: Matching cyrillic chars in JSON with PHP

帅比萌擦擦* 提交于 2019-12-24 17:42:33
问题 I'm developing a plugin for a CMS and have an unanticipated problem: because the plugin is multilang-enabled, input can be of any of the unicode character sets. The plugin saves data in json format, and contains objects with properties value and lookup . For value everything is fine, but the lookup property is used by PHP to retrieve these entities, and at certain points through regexes (content filters). The problems are: For non-latin characters (eg. Экспорт), the \w (word-char) in a regex

test php disabled caching

夙愿已清 提交于 2019-12-24 16:53:32
问题 My site had a problem in that certain browsers (especially opera and gecko) were "over-caching" (caching far too much for my taste). I've just added the following PHP snippet to hopefully disable caching in all browsers: <?php header("Expires: Tue, 01 Jan 2000 00:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"

Which is the most seo-friendly way to detect browser language and redirect 301 to home page

北城以北 提交于 2019-12-24 16:42:59
问题 I have a multi-language page, I want to detect client browser's language then make a 301 home page or other thing. but I am not sure which way is better for seo. I do not know web spider like which one? Or other way? <?php $LG=$_SERVER['HTTP_ACCEPT_LANGUAGE']; if (preg_match('/^[zZ][hH]/', $LG)) { header("HTTP/1.1 301 Moved Permanently"); header("Location: http://mydomain.com/cn/"); exit();} //jump to chinese version else { header("HTTP/1.1 301 Moved Permanently"); header("Location: http:/

Angular: set Content-Type per query

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 15:53:20
问题 I need to perform one query with Content-Type different than application/json . Changing default $http options is not a variant, because a lot of queries still be performed with JSON data. I've found example var req = { method: 'POST', url: 'example.com', headers: { 'Content-Type': "application/x-www-form-urlencoded" }, data: "somedata" } $http(req).then(function (resp) { console.log(resp);}); But it don't want to work — Content-Type is still a application/json . Is any true way to do it

Cors requests and MVC5

五迷三道 提交于 2019-12-24 15:35:34
问题 So I have a view on a controller ... [AllowAnonymous] [Route("MyView")] public ActionResult MyView() { // first attempt at solving problem Response.AddHeader("Access-Control-Allow-Origin", "*"); Response.AddHeader("Access-Control-Allow-Headers", "*"); Response.AddHeader("Access-Control-Allow-Methods", "*"); return PartialView(); } I tried adding this attribute (2nd attempt) ... public class AllowCors : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext

CORS request aborted when adding a custom header in AJAX CORS request in IE10

二次信任 提交于 2019-12-24 14:57:35
问题 When I add this header to my jQueryAjax request: headers: { "Authorization": "SomeValue" } on the server I add the Authorization header to the h.Add("Access-Control-Allow-Headers","Authorization"); This works fine in other browsers but not in IE10! ONE REMARK: If I comment out the authentication header, refresh the page, issue a regular GET request to my web api which by default does not trigger a preflight request. After that request, I uncomment the custom header in my jquery request, save,

Passing http request header to RestAPI from SpringXD using http-client processor

左心房为你撑大大i 提交于 2019-12-24 14:30:35
问题 I am trying to hit a rest api from my http-client processor module. I would like to know how can I send request header to the url I am trying to hit. Without the request header I get 500 Internal Server Error. Will mappedRequestHeaders option be useful to pass headers, can someone give an example please. Below is how my stream looks like : jms --destination= | http-client --url='''https://hostname:11210/cards/accounts?eName=John%20Smith&caFSix=426600&caLF=1234''' --httpMethod=GET | log 回答1:

Worklight Adapter Override Origin of request

不打扰是莪最后的温柔 提交于 2019-12-24 13:32:08
问题 Worklight 6.1 Using Chrome to test backend access API's and in one scenario the ability to override the Origin is needed to successfully issue the request and avoid a status 403. Implementing the same API in a Worklight http adapter I would like to override the Origin to avoid hitting a 403. It is possible to override the Origin in a worklight http adapter. Thanks for your time and help 回答1: Did not try this myself as I don't have an application doing what that yours is doing, but you can add

Clients using `GET` requests for a form, even though `POST` is defined. is javascript iframe the cause?

走远了吗. 提交于 2019-12-24 13:26:06
问题 I have two subsequent forms on my website with POST method. The first page of my website first.php contains this code: <form action="a.php" method="POST" target="_blank"> <input name="value" type="hidden" value="foo"/> <div class="button"><label><span class="icon"></span> <input type="submit" class="button-graphic ajax" value="Click Here"></label></div></form> a.php can be accessed only via this POST request (otherwise user will get method not allowed 405 error) Once submitted, this form