skip to Main Content

Javascript – Web API With AJAX problem /Failed to load resource: the server responded with a status of 400 ()

[HttpPost("Login")] public async Task<IActionResult> Login([FromBody] SigninViewModel formData) { MemberCredential membercredential = await db.MemberCredential.FirstOrDefaultAsync(t => t.MemberAccount.Equals(formData.memberAccount)); if (membercredential == null) { var test = new { success = false, message = "無此帳號,請重新輸入。" }; Console.WriteLine(test); return BadRequest(new { success = false, message…

VIEW QUESTION

Jquery – Getting CORS issue in API calling from AJAX

I am getting CORS issue while calling API from Ajax with header Content-Security-Policy":"frame-ancestors 'none'. My APIs are built in Java spring boot. API server is already configured with Access-Control-Allow-Origin : *. If i remove Content-Security-Policy":"frame-ancestors 'none', the API is working…

VIEW QUESTION
Back To Top
Search