CORS issues with Basic Auth and angularjs http calls
Hello,
I am trying to create an angularjs app that will call my teamcity( 9.1.7 (build 37573) ) service via API calls.
If i use POSTMAN or PHP everything works, but javascript is having CORS issues
I have already added to the internal.properties file ( and restarted )
rest.cors.optionsRequest.allowUnauthorized=true
rest.cors.origins=http://localhost:8888
I have enabled the debug_auth and i see
[2017-03-10 13:31:43,421]DEBUG [:0:0:0:1; http-nio-5000-exec-9] - Processing request with no authorization header: OPTIONS '/httpAuth/app/rest/projects', from client 0:0:0:0:0:0:0:1:50295, no associated user
[2017-03-10 13:31:43,423] DEBUG [:0:0:0:1; http-nio-5000-exec-9] - Matched authentication scheme: jetbrains.buildServer.controllers.interceptors.auth.impl.AgentHttpAuthenticationScheme, authResult: UNAUTHENTICATED
[2017-03-10 13:31:43,423] DEBUG [:0:0:0:1; http-nio-5000-exec-9] - Responding with 401 HTTP status with message "Unauthorized: "Authorization" header is not specified", sending header in response: WWW-Authenticate: Basic realm="TeamCity"
[2017-03-10 13:31:43,425] DEBUG [ http-nio-5000-exec-9] - Creating session {id: '6647C5917DB6DBBD772D7E27C396B5B3'}
From what i have read ( and i am no CORS expert by any means) , the OPTIONS call is suppose to exclude users credentials
Thanks for any help
Please sign in to leave a comment.