I have a problem in sending POST request to API.
I have web application composed like following structure.
user → cloudfront → S3 → cloudfront → API server
Web application is working on S3.
I have a function in my web app that updates users profile. Sending this POST Request from PC web browser and chrome mobile mode is fine. But when I use actual smartphone, nothing happens.(can not update users profile)
So, I sent request to the API server by curl command to investigate it, it returned response code 502(The request could not be satisfied)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>502 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
The origin closed the connection.
<BR clear="all"/>
If you received this error while trying to use an app or access a website, please contact the provider or website owner for assistance.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by following steps in the CloudFront documentation
(<A href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html">https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html</A>).
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==
I don't understand why accessing from pc web browser is no problem. But using real mobile phone causes problem. I assume that sending request by curl command causes a same problem with mobile phone.(might be because of cloudfront setting)
Does anybody know what is going on??
Http request is different depending upon PC web browser and mobile phone??
Aucun commentaire:
Enregistrer un commentaire