php


No 'Access-Control-Allow-Origin' header is present on the requested resource. But when I check headers it is set


I'm getting following error when trying to POST with AJAX to my script.
XMLHttpRequest cannot load http://nasseira.epizy.com/domPath.php. No 'Access-Control-Allow-Origin' header is present on the requested resource.
AJAX Call:
jQuery.ajax({
type: "POST",
url : "http://nasseira.epizy.com/domPath.php",
data: {json: JSON.stringify(allMyPath)},
success: function (data) {
console.log(data);
},
error: function(){
console.log("Error");
}
});
PHP Script:
<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Credentials: true ");
header("Access-Control-Allow-Methods: OPTIONS, GET, POST");
header("Access-Control-Allow-Headers: Content-Type, Depth, User-Agent, X-File-Size,
X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control");
return print "ok";
?>
However when I check the headers it seems to be set correctly:
http://i.imgur.com/rRwBRmU.png
What am I doing wrong?

Related Links

different Delphi / PHP Encryption-Decryption using Rijndael
my .htaccess edit is crashing site
Laravel form method get - url parameters
GAE - php5.5 - The PHP runtime is not available
Get current action in CakePHP 3
Cannot store localstorage values via AJAX
Check if session variable is set by first part of its name
How can I display image of blob type in php?
Yii caching the changes on local machine
I cannot get data from xml file
Run Insert queries upto 5 mintues MySql
Yii framework validation rules
Magento/Mailchimp integration, import fails
Trying to open (and create if not exists) file on mapped network drive in PHP
How to remove table row if condition met in table cell? - preg_replace or domdocument are welcome
ext-mcrypt error while installing laravel on ubuntu 14.04

Categories

HOME
opengl
openshift
qc
scroll
key
windows-10
subdomain
activemq
tcsh
slider
apk
android-emulator
liferay-7
dependencies
vue-resource
amp
jint
supercollider
fedora
stored-procedures
position
javafx-8
timber
anchor
log4j2
fullcalendar-scheduler
stimulsoft
spring-jpa
scala-ide
http-authentication
amazon-mws
pst
multi-upload
cell
quartz.net
web-config-transform
data-collection
tracing
sfml
autodesk-model-derivative
mapnik
reporting
gsp
dreamfactory
assemblies
grails3.2.0
classnotfoundexception
word-cloud
zend-form
code-push
rightnow-crm
dredd
sonarqube5.2
cloudwatch
phppgadmin
datediff
spring.net
asp.net-web-api-routing
degrees
adobe-reader
streamwriter
between
apple-configurator
android-mapview
apache-commons-digester
ora-04091
gitlab-omnibus
roxygen2
componentart
erlog
sablecc
jquery-mobile-flipswitch
squeezebox
stripe.net
sqlbindparameter
accountmanager
principalcontext
strcmp
visual-c++-2005
saga
apache-shindig
grails-2.3
acitree
codahale-metrics
ntlmv2
itunes-sdk
lynx
gitx
border-box
firebird1.5
dropshadow
mmc3
play2-mini
space-partitioning
mediacontroller
cewolf
tablet-pc
upshot
simile
servlet-container
eaccelerator
pinax
.net-services

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App