Skip to content

Error!Status: undefined Origin is not allowed by Access-Control-Allow-Origin.  #1

@dzogchen

Description

@dzogchen

I have angular-yii set up on vanilla MAMP Pro on my dev machine.

I can run the tests successfully, at http://angular-michael/ng-yii/test/runner.html (running on local machine...)

But going to the actual site URL, the page renders with serious errors -- neither http://angular-michael/ng-yii/dev/ or http://angular-michael:3005/ can seem to connect to the back end -.I get a "Error!Status: undefined .Message from server: undefined" in the noty_bar.

from chrome tools console:
"Origin http://angular-michael is not allowed by Access-Control-Allow-Origin.".

it seems the headers are set in a non-cooperative way.... but I am having some trouble determining where that header is set... and why would the test pass but the site fail?

It also looks like localhost is being prepended to the YII_APP_BASE_URL I set:

"XMLHttpRequest cannot load http://localhost/angular-michael/api/collectionRest. Origin http://angular-michael is not allowed by Access-Control-Allow-Origin. "

Is there some special way to treat MAMP sites with local name resolution or something??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions