Posts

ssl - Apache 2.4 url rewriting with https -

i'm trying url rewriting apache 2.4. want requests to http://subdomain.domain.com http://www.subdomain.domain.com https://www.subdomain.domain.com are remapped https://subdomain.domain.com to avoid error in ssl wildcard cert doesn't not match www.subdomain.domain.com. i tried with: <virtualhost ip:80> servername subdomain.domain.com rewriteengine on rewritecond %{https} off rewriterule (.*) https://%{http_host}%{request_uri} </virtualhost> <virtualhost ip:80> servername www.subdomain.domain.com redirect permanent / https://subdomain.domain.com </virtualhost> <virtualhost ip:443> servername www.subdomain.domain.com redirect permanent / https://subdomain.domain.com </virtualhost> <virtualhost ip:443> servername subdomain.domain.com ... ... ... my configuration works (1) , (2) not (3). mistake? ...

javascript - NightwatchJS: How to check if attribute is not present? -

i want check if disabled attribute not present on button using nightwatchjs. i tried doing these: .assert.attributecontains('.phone-verify-btn', 'disabled', 'null') .assert.attributecontains('.phone-verify-btn', 'disabled', null) .assert.attributecontains('.phone-verify-btn', 'disabled', 'false') .assert.attributecontains('.phone-verify-btn', 'disabled', false) but these don't seem work check if disabled set true so: .assert.attributecontains('.phone-verify-btn', 'disabled', 'true') this works fine! idea what's happening here? error rather cryptic: element not have disabled attribute. - expected "null" got: null in case,i think should attribute first until have better solution. 1 works me : browser.getattribute('@element','disabled',function(result){ if(result.value === 'true'){ // element dis...

javascript - Typeahead remote without query -

i trying use typeahead , bloodhound framework search response of api paths, remote api call. by example url api.example.com/getendpoints receive object containing endpoints. i'd want typeahead filter endpoints. far understand want specify query when using remote, can't, receive endpoints in 1 request. is there way, or suggestion, solve issue? my code like // instantiate bloodhound suggestion engine var endpoints = new bloodhound({ datumtokenizer: function (datum) { console.log('datumtokenizer, datum: ', datum, ', datum.value: ', datum.value); return bloodhound.tokenizers.whitespace(datum.value); }, querytokenizer: bloodhound.tokenizers.whitespace, remote: { url: 'https://api.example.com/getendpoints', filter: function (endpoints) { console.log(endpoints); // map remote source json array javascript object array return object.keys(endpoints).map(function (e...

c# - How to handle an unsecured or incorrectly secured fault in WCF? -

i have webapi project connects wcf service on https . project installed on 2 different development machines , started locally using iis express. the service works fine on 1 machine. however, on other machine, following error: an unsecured or incorrectly secured fault received other party. see inner faultexception fault code , detail. the inner faultexception is: exception during request the same error happens when running webapi on actual iis. code connects service is: endpointaddress ea = new endpointaddress(new uri(url), new dnsendpointidentity(identity), new addressheadercollection().toarray()); myservice service = new myservice(new custombindingsecureheader(), ea); service.endpoint.endpointbehaviors.add(new custommessageinspector()); service.clientcredentials.servicecertificate.authentication.certificatevalidationmode = x509certificatevalidationmode.none; service.clientcredentials.servicecertificate.defaultcertificate = new x509certificate2(servercert); ser...

android - Your APK's version code needs to be higher than xxx phonegap -

i using phonegap deploy apps on itunes , google play.my config file looks this <widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.crondale.tippnett" version="1.1.13"> <name>tippnett</name> <description>tippnett er et system å som bidrar til bedre massebalanse. systemet finner anlegg nærheten med motsatt massebehov. det bidrar til kortere kjørelengde og raskere anleggsutførsel. du sparer penger, tillegg til @ miljøet blir spart co2 utslipp.</description> <author href="http://www.crondale.com" email="support@crondale.com">crondale</author> <content src="index.html" /> <access origin="*" /> <preference name="splashscreen" value="screen" /> <preference name="windows-target-version" value="8.0" /> <preference name="windows-phone-target-version...

Elasticsearch Aggregation Max Value -

{ "aggs":{ "nest_exams":{ "nested":{ "path": "exams" }, "aggs":{ "exams":{ "filter" : { "term": { "exams.exam_id": 96690 } }, "aggs":{ "nested_attempts":{ "nested":{ "path": "exams.attempts" }, "aggs":{ "user_attempts":{ "terms":{ "field": "exams.attempts.user_id", "size": 0 }, "aggs":{ ...

php - Syntax error when trying to put together constant and string -

this question has answer here: php parse/syntax errors; , how solve them? 12 answers normally wouldn't post syntax errors here, case bit suspicious me. trying put constant string. works fine on localhost, when push project on web server, tells me: parse error: syntax error, unexpected '.', expecting ',' or ';' in xxx on line xxx code: define("root", str_replace("index.php", "", $_server["script_filename"])); and $somepath = root . "some/path"; //synax error in line has different php versions? (5.5 on webserver, 7.0 localhost) update some updates in code: class someclass { private $somepath = root . "some/path"; //synax error in line ... } you can't use str_replace() nor function when defining contant. try: define("root", $_serv...