1
클라이언트에서 백엔드 및 angularjs를 사용하면 서로 다른 도메인에서 작동합니다. 다음과 같이 내가 고르 설정 :ServiceStack 로그인 요청 양식 이후에 세션 쿠키 저장 안 함 형식 십자가
Plugins.Add(new CorsFeature(
allowCredentials: true,
allowOriginWhitelist: new[]{"http://localhost:11104", "http://localhost:61923/"},
allowedMethods: "GET, POST, PUT, DELETE, OPTIONS",
allowedHeaders: "Content-Type"));
쿠키를 얻기 위해 요청을하지만, 다음 쿼리 따라서 인증을 통과하지 않습니다 전송하지 않는 경우.
로그인 요청 :
$http({
method: "POST",
url: "http://localhost:61923/auth/Credentials?format=json",
params: { "username": $scope.LoginParams.UserName, "password": $scope.LoginParams.Password }
})
다음 요청 :
$http({
method: "POST",
url: "http://localhost:61923/IsAdmin?format=json"
})
도와주세요, 내가 잘못 뭐하는 거지? (( 감사