...
Log into magento admin
Click Stores in the left menu
Click Configuration under settings
Click Redirects under the Relias Section
Change the hostnames in the configuration section to http://localhost:4502
Save the above config
Click CORS Requests Configuration
Change Default Origin url to http://localhost:4502
Click Save Config
You can verify this worked by trying to log into the AEM site, if the page gives an error with an invalid user, then this configuration is complete.