워드프레스 Site Health REST API 차단 해제

Block issue

클라우드 플레어 → Security → WAF → Tools 에서 자신의 서버 아이피를 집어넣고 ActionAllow 하면 됨.

예를들어 라이트세일 기준 IPv6 주소로 들어오는데 이걸 넣으면 됨.

어떤 주소로 들어와서 막히는지는 클플 → Security → Events 에서 확인 가능.

로그 보면 자신의 서버 ip 로 Managed Challenge - Bot fight mode 당했을것.

아래같은 오류가 나올 때 하면 됨.

한글 키워드는 예약된 이벤트 실패, REST API 예상치 못한 결과, 루프백 요청 불가, 페이지 캐시 존재 감지 불가.

A scheduled event has failed

The scheduled event, wp_privacy_delete_old_export_files, failed to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.
The REST API encountered an unexpected result

The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.

When testing the REST API, an unexpected result was returned:

REST API Endpoint: https://example.com/wp-json/wp/v2/types/post?context=edit
REST API Response: (403) Forbidden
Your site could not complete a loopback request

Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

The loopback request returned an unexpected http status code, 403, it was not possible to determine if this will prevent features from working as expected.
Unable to detect the presence of page cache

Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: Forbidden (Code: http_403)

Page cache enhances the speed and performance of your site by saving and serving static pages instead of calling for a page every time a user visits.

Page cache is detected by looking for an active page cache plugin as well as making three requests to the homepage and looking for one or more of the following HTTP client caching response headers:

Cache issue

다른 경우로 저 경고에서 보이는 https://example.com/wp-json/wp/v2/types/post?context=edit 경로가 접근 권한이 없이 접근됐을때 캐시돼서, 권한 없는 상태를 서버가 맞이하는 경우에도 오류가 생김.

Cloudflare → Caching → Cache Rules 에서 해당하는 룰을 찾아서 비활성화 하던가,

직접 제일 아래에(클플 캐시는 가장 아래 있는것이 최우선 적용, 즉 바이패스시 가장 강함)

URI Path, contains, /wp-json/wp/v2/types/post 를 등록하고

and, URI Query String, contains, context=edit 로 경로와 쿼리를 설정한 뒤

Cache eligibility, Bypass cache 하면 됨. 아래는 Expression 코드

(http.request.uri.path contains "/wp-json/wp/v2/types/post" and http.request.uri.query contains "context=edit")