Having recently started working with Angular and Azure setups, I am facing an issue with a simple jade login form that posts to a URL (different origin than my website) upon submission. As a security measure, I have replaced the actual URL with a sample one.
form(name='loginForm' id="loginForm" method="post" action="https://www.test.userloginauth.com/test")
.form-group
input(type='text' name='user' class='form-control' required id='loginUser')
.form-group
input(type='password' name='pw' class='form-control' required id='loginPw')
div.hidden
input(type='hidden' name='site' value='gf')
.login
button(class='custom-button' name='Submit' type='submit' id='submit' value='Submit') Sign In
The validation of login credentials occurs at
https://www.test.userloginauth.com/test
, and upon successful verification, the user is redirected to my test page: https://www.test.mysite.com/loggedin
. (Note: This page is located at /loggedin/index.jade - not sure if that affects anything. I have also tried /loggedin/test.jade.) Additionally, https://www.test.userloginauth.com/test
sends a POST
request back to this page containing the user's ID.
After entering valid login details, I was successfully redirected to
https://www.test.mysite.com/loggedin
as expected. However, the problem arises when I receive a 404 error message stating, "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
I am unsure why this error occurs only when https://www.test.userloginauth.com/test
posts to my site, as navigating directly to https://www.test.mysite.com/loggedin
loads the page perfectly.
I suspect there might be something missing in my web.config
file. Here are the configurations I have attempted:
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="GET,POST,DELETE,HEAD,PUT,OPTIONS" />
<add name="Access-Control-Allow-Headers" value="Origin, X-Olaround-Debug-Mode, Authorization, Accept, Content-Type" />
<add name="Access-Control-Expose-Headers" value="X-Olaround-Debug-Mode, X-Olaround-Request-Start-Timestamp, X-Olaround-Request-End-Timestamp, X-Olaround-Request-Time, X-Olaround-Request-Method, X-Olaround-Request-Result, X-Olaround-Request-Endpoint" />
</customHeaders>
</httpProtocol>
If anyone could provide assistance, it would be greatly appreciated!