Bảo mật truyền tải ứng dụng
App Transport Security (ATS) là một tính năng về quyền riêng tư giúp thực thi các kết nối bảo mật. Tính năng này được bật theo mặc định cho các ứng dụng mới.
Thông báo nhật ký sau sẽ xuất hiện khi một ứng dụng không tuân thủ ATS cố gắng phân phát quảng cáo bằng HTTP:
App Transport Security đã chặn một hoạt động tải tài nguyên HTTP (http://) ở dạng văn bản thô vì tài nguyên đó không an toàn. Bạn có thể định cấu hình cho các trường hợp ngoại lệ tạm thời trong tệp Info.plist
của ứng dụng.
Để vô hiệu hoá các quy định hạn chế của ATS, hãy thêm các trường hợp ngoại lệ sau vào Info.plist
của ứng dụng:
NSAllowsArbitraryLoadsForMedia
NSAllowsArbitraryLoadsInWebContent
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
Bạn bắt buộc phải có khoá NSAllowsArbitraryLoadsForMedia
và NSAllowsArbitraryLoadsInWebContent
để đảm bảo quảng cáo của bạn không bị ảnh hưởng bởi ATS.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-02-08 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-02-08 UTC."],[[["App Transport Security (ATS) enforces secure connections and is enabled by default for new apps, blocking cleartext HTTP resource loads for enhanced security."],["To avoid ATS restrictions and ensure ad serving functionality, developers need to include `NSAllowsArbitraryLoadsForMedia` and `NSAllowsArbitraryLoadsInWebContent` exceptions within their app's `Info.plist` file."],["These exceptions allow media and web content to bypass ATS restrictions, preventing disruption to ad delivery."]]],["App Transport Security (ATS) enforces secure connections and is enabled by default. Non-compliant apps using HTTP trigger a log message indicating blocked insecure resource loads. To disable ATS restrictions for media and web content, add `NSAllowsArbitraryLoadsForMedia` and `NSAllowsArbitraryLoadsInWebContent` keys set to `true` within the app's `Info.plist` file, under the `NSAppTransportSecurity` dictionary. These exceptions are essential to prevent ads from being affected by ATS.\n"]]