Inf*_*box 25 html php forms https amazon-web-services
This distribution is not configured to allow the HTTP request method that was used for this request. The distribution supports only cachable requests.
Run Code Online (Sandbox Code Playgroud)
我已将网站配置为仅在令人惊叹的云端接受https.简而言之,您有一个php登录表单,并在成功登录后重定向用户,如下所示:
if(isset($_POST['login'])){
[...]
echo "<script>window.open('coursePayment.php?crs_id=$crs_id','_self')</script>";
Run Code Online (Sandbox Code Playgroud)
以下是表格:
<form style="margin-top:-20px" method='post' action='' class='form-horizontal' role='form'>
<input type="hidden" id="couponCodeLogin" name="couponCodeLogin">
<input type="hidden" id="couponCodeLoginAmount" name="couponCodeLoginAmount">
<br><br>
<div class="group">
<input type='text' class='form-control' name='email' required>
<span class="highlight"></span>
<span class="bar"></span>
<label>Email</label>
</div>
<div class="group">
<input type='password' class='form-control' name='pass' required>
<span class="highlight"></span>
<span class="bar"></span>
<label>Password</label>
</div>
<h5 style="color:#FF6400; cursor:context-menu; margin-top:0px" class="displayForgotPassword">Forgot your password? Click here to retrieve it.</h5><br>
<input type='submit' id='moreInfoButton' name='login' value='Continue' class='btn btn-danger'>
</form>
Run Code Online (Sandbox Code Playgroud)
Mir*_*cea 21
试图告诉你的错误是你不能使用POST.猜测可缓存意味着在这种情况下GET.您需要继续配置云前端以允许"上传请求",如POST,PUT等.在这种情况下,请求将转到Cloudfront使用的来源.
Aws docs:http: //docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating.html
在最后一个链接中查找允许的HTTP方法.
发生此错误是因为CloudFront没有配置为接受正在发送的HTTP请求(如POST或PATCH)。
要对其进行修复,请更改您的CloudFront分配设置以接受所有HTTP方法。
为此,请单击BehaviorsCloudFront分发的选项卡,选择默认行为,单击Edit,将更Allowed HTTP Methods改为GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE,然后单击Yes, Edit右下角的以保存更改。
您的CloudFront发行版可能要花费几分钟才能传播更改。