Endpoint does not work because of HTTPS redirect.

0

Hello Community! I have a problem with an API that supports only HTTP connections. I have no problem fetching connections via localhost, as my PC does not rewrite my request to HTTPS. I host my application in AWS Amplify, so cross-origin requests are turned on. My question is how can I turn HTTP to HTTPS redirect on Amplify so I can use my endpoint without an issue?

Thanks for your answers in advance!

AdamR
已提問 3 個月前檢視次數 127 次
1 個回答
0

To redirect HTTP traffic to HTTPS on your Amplify app, you can configure redirects in the Amplify console settings.

  • Log into the AWS Amplify console and select your app
  • Go to the app settings section where you can manage routing and redirects.
  • Look for options to add URL redirect rules. You can add a rule to redirect all HTTP requests to the same URL but with HTTPS.
  • Make sure the security group for your Amplify app allows outbound traffic on port 443.
  • You can also configure HTTPS for your EC2 instance hosting the WordPress site using an Application Load Balancer and SSL/TLS certificate. The AWS documentation provides steps to create an HTTPS listener and redirect HTTP to HTTPS using listener rules.
profile picture
專家
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南