This project has moved. For the latest updates, please go here.

Does CORS work on helios?

Jul 11, 2014 at 6:01 PM
i've got UseCors middleare, I've got nancy returning headers, i've got web.config allowing it
I have this script
<head>
</head>

<body>

    <input type="button" id='button' value='click' />

    <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
    <script>
        $(document).ready(function () {
            $("#button").click(function () {
                $.ajax({
                        type: 'POST',
                        url: "http://10.0.1.11/api/login",
                        crossDomain: true,
                        contentType: 'json',
                        dataType: 'json',
                        data: {
                            "username": "admin",
                            "password": "password2"
                        }
                    })
                    .done(function (msg) {
                        alert("Data Saved: " + msg);
                    })
                    .fail(function (jqXHR, textStatus) {
                        alert("Request failed: " + textStatus);
                    });
            });
        });
    </script>
</body>

</html>
Chrome always returns OPTIONS
Coordinator
Jul 11, 2014 at 6:05 PM
What Web.Config? I don't think there should be any Web.Config involved.
Jul 11, 2014 at 6:07 PM
Web.Config in my project that references Microsoft.Owin.Host.IIS