HardBurn
HardBurn

Reputation: 412

AWS Amplify mock in HTTPS

Using the following stack:

When running amplify mock it automatically assigns an endpoint with HTTP (as can be seen in the terminal and the aws-exports.js file).

I am however hosting my app locally in an HTTPS environment using ($env:HTTPS="true") -and (npm start) so as to better accommodate the social sign-ins which usually require all requests to come from HTTPS even if on localhost.

I constantly have to change my env to HTTP to try out things with the mock backend instead of just maintaining everything in HTTPS.

Is there a way to let the mock backend be served over HTTPS?

Upvotes: 1

Views: 611

Answers (1)

HardBurn
HardBurn

Reputation: 412

I have found a partial answer.

using the chrome browser settings, select privacy and security and go to site settings.

Add the URLS you are requesting over http into the insecure content allowable section. This allows an origin of https to request over http.

Upvotes: 2

Related Questions