플러그인 설정안전하지 않은 URL에서 미디어 항목 만들기
안전하지 않은 URL에서 미디어 항목 만들기
기본적으로, createMediaItem 뮤테이션을 사용하여 URL에서 이미지를 생성할 때, .local 도메인과 같은 안전하지 않은 URL(예: https://testing-site.local/wp-content/uploads/2025/01/image.jpg)은 허용되지 않습니다.
예를 들어, 다음 쿼리를 실행하면:
mutation {
createMediaItem(
input: {
from: { url: { source: "https://testing-site.local/wp-content/uploads/2025/01/image.jpg" } }
}
){
mediaItemID
status
errors {
__typename
...on GenericErrorPayload {
message
}
}
}
}...다음과 같은 결과가 반환될 수 있습니다:
{
"data": {
"createMediaItem": {
"mediaItemID": null,
"status": "FAILURE",
"errors": [
{
"__typename": "GenericErrorPayload",
"message": "A valid URL was not provided."
}
]
}
}
}이 동작을 변경하려면, 설정 페이지의 Schema Elements Configuration > Media Mutations 로 이동하여 Reject unsafe URLs 옵션의 체크를 해제하세요:
