How do we enable ATS for an Expo app? We need to do this to make the penetration tests pass.
App Transport Security is a security feature introduced in iOS 9 that rejects all HTTP requests that are not sent over HTTPS. This can result in HTTP traffic being blocked, including the developer React Native server. ATS is disabled for
localhost by default in React Native projects in order to make development easier.
You should re-enable ATS prior to building your app for production by removing the
localhost entry from the
NSExceptionDomains dictionary and setting
false in your
Info.plist file in the
ios/ folder. You can also re-enable ATS from within Xcode by opening your target properties under the Info pane and editing the App Transport Security Settings entry.