I am attempting to set up some CORS ( http://enable-cors.org/index.html ) but it seems mivascript is not responding correctly. A near identical php files does however.
Anyone have CORS working? or any suggestions?
My mivascript code:
and the PHP:
Anyone have CORS working? or any suggestions?
My mivascript code:
Code:
<MvAssign name="l.ok" value="{ miva_output_header('Content-Type:', 'text/html') }"> <MvAssign name="l.ok" value="{ miva_output_header('Access-Control-Allow-Origin:', '*') }"> <MvAssign name="l.ok" value="{ miva_output_header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS') }"> <MvAssign name="l.ok" value="{ miva_output_header('Access-Control-Max-Age', '86400') }"> <html><head> </head> <body> TEST CONTENT </body> </html>
Code:
<?php // Date in the past header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Methods: GET, POST, OPTIONS"); header("Access-Control-Max-Age: 86400"); header("Content-Type: text/html"); ?> <html><head> </head> <body> TEST CONTENT PHP. </body> </html>
Comment