QHstsPolicy Class
QHstsPolicy 클래스는 호스트가 HTTP 엄격한 전송 보안 정책(HSTS)을 지원하도록 지정합니다. 더 보기...
헤더: | #include <QHstsPolicy> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
qmake: | QT += network |
- 상속된 멤버를 포함한 모든 멤버 목록
- QHstsPolicy는 네트워크 프로그래밍 API의 일부입니다.
공용 유형
enum | PolicyFlag { IncludeSubDomains } |
flags | PolicyFlags |
공용 함수
QHstsPolicy() | |
QHstsPolicy(const QDateTime &expiry, QHstsPolicy::PolicyFlags flags, const QString &host, QUrl::ParsingMode mode = QUrl::DecodedMode) | |
QHstsPolicy(const QHstsPolicy &other) | |
~QHstsPolicy() | |
QDateTime | expiry() const |
QString | host(QUrl::ComponentFormattingOptions options = QUrl::FullyDecoded) const |
bool | includesSubDomains() const |
bool | isExpired() const |
void | setExpiry(const QDateTime &expiry) |
void | setHost(const QString &host, QUrl::ParsingMode mode = QUrl::DecodedMode) |
void | setIncludesSubDomains(bool include) |
void | swap(QHstsPolicy &other) |
QHstsPolicy & | operator=(const QHstsPolicy &other) |
관련 비회원
bool | operator!=(const QHstsPolicy &lhs, const QHstsPolicy &rhs) |
bool | operator==(const QHstsPolicy &lhs, const QHstsPolicy &rhs) |
상세 설명
HSTS 정책은 QNetworkAccessManager 이 보안 방식으로만 호스트에 액세스해야 하는 기간을 정의합니다. HSTS 정책은 RFC6797에 정의되어 있습니다.
생성자에서 또는 setExpiry(), setHost() 및 setIncludesSubDomains()를 호출하여 이 정책의 만료 시간과 호스트 이름을 설정하고 하위 도메인에 적용할지 여부를 제어할 수 있습니다.
QNetworkAccessManager::setStrictTransportSecurityEnabled()도 참조하세요 .
멤버 유형 문서
열거형 QHstsPolicy::PolicyFlag
플래그 QHstsPolicy::PolicyFlags
Constant | 값 | 설명 |
---|---|---|
QHstsPolicy::IncludeSubDomains | 1 | 정책에 하위 도메인을 포함해야 하는지 여부를 나타냅니다. |
PolicyFlags 유형은 QFlags<PolicyFlag>에 대한 typedef입니다. PolicyFlag 값의 OR 조합을 저장합니다.
멤버 함수 문서
QHstsPolicy::QHstsPolicy()
호스트 이름이 비어 있고 하위 도메인이 포함되지 않은 유효하지 않은(만료된) 정책을 작성합니다.
QHstsPolicy::QHstsPolicy(const QDateTime &expiry, QHstsPolicy::PolicyFlags flags, const QString &host, QUrl::ParsingMode mode = QUrl::DecodedMode)
expiry flags 은 이 정책에 하위 도메인도 포함해야 하는지 여부를 나타내는 값이며, 데이터는 에 따라 해석됩니다. host mode
QUrl::setHost(), QUrl::ParsingMode, QHstsPolicy::PolicyFlag도 참조하세요 .
QHstsPolicy::QHstsPolicy(const QHstsPolicy &other)
other 객체의 복사본을 만듭니다.
[noexcept]
QHstsPolicy::~QHstsPolicy()
파괴자.
QDateTime QHstsPolicy::expiry() const
정책의 만료일(UTC 기준)을 반환합니다.
setExpiry()도 참조하세요 .
QString QHstsPolicy::host(QUrl::ComponentFormattingOptions options = QUrl::FullyDecoded) const
options 에 따라 포맷된 지정된 정책에 대한 호스트를 반환합니다.
setHost(), QUrl::host() 및 QUrl::ComponentFormattingOptions 를참조하세요 .
bool QHstsPolicy::includesSubDomains() const
이 정책에 하위 도메인도 포함된 경우 true
을 반환합니다.
setIncludesSubDomains()도 참조하세요 .
bool QHstsPolicy::isExpired() const
이 정책에 유효한 만료 날짜가 있고 이 날짜가 QDateTime::currentGetDateTimeUtc()보다 큰 경우 true
를 반환합니다.
setExpiry() 및 expiry()도 참조하세요 .
void QHstsPolicy::setExpiry(const QDateTime &expiry)
정책의 만료일(UTC 기준)을 expiry 로 설정합니다.
expiry()도 참조하세요 .
void QHstsPolicy::setHost(const QString &host, QUrl::ParsingMode mode = QUrl::DecodedMode)
호스트 설정, host 데이터는 mode 매개변수에 따라 해석됩니다.
host(), QUrl::setHost() 및 QUrl::ParsingMode도 참조하세요 .
void QHstsPolicy::setIncludesSubDomains(bool include)
이 정책에 하위 도메인을 포함할지 여부를 include 로 설정합니다.
includesSubDomains()도 참조하세요 .
[noexcept]
void QHstsPolicy::swap(QHstsPolicy &other)
이 정책을 other 로 바꿉니다. 이 작업은 매우 빠르며 실패하지 않습니다.
QHstsPolicy &QHstsPolicy::operator=(const QHstsPolicy &other)
복사 할당 연산자, other 의 복사본을 만듭니다.
관련 비회원
bool operator!=(const QHstsPolicy &lhs, const QHstsPolicy &rhs)
두 정책 lhs 및 rhs 의 호스트 또는 만료일이 같지 않거나 하위 도메인을 포함할지 제외할지 동의하지 않는 경우 true
를 반환합니다.
bool operator==(const QHstsPolicy &lhs, const QHstsPolicy &rhs)
하위 도메인을 포함할지 제외할지 동의하면서 두 정책 lhs 및 rhs 의 호스트와 만료일이 동일한 경우 true
을 반환합니다.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.