WeChat 미니 프로그램 인증을 위해 Discourse 루트 디렉터리에 TXT 파일을 어떻게 배치하나요?

여러분 안녕하세요,

저는 mydomain.com 서버에 표준(공식) Docker 기반 Discourse를 설치하여 사용 중입니다. https://mydomain.com/xx.txt 경로에 TXT 파일을 배치하여 공개적으로 접근할 수 있도록 해야 합니다. 이는 WeChat 미니 프로그램에 WebView를 통해 제 Discourse 사이트를 임베드하기 위한 인증에 필요합니다. 구체적으로 WeChat 미니 프로그램은 도메인 소유권을 확인하기 위해 도메인 루트 경로에 TXT 파일이 있어야 합니다.

질문: 기본 Docker 설정으로 설치된 제 Discourse 사이트의 “루트 디렉터리”는 어디인가요?

목표: https://mydomain.com/xx.txt가 공개적으로 접근 가능하도록 하는 것입니다.

배경: xx.txt 파일이 도메인 루트에서 직접 서빙되도록 해야 합니다. 포럼은 정상적으로 운영 중이며, 표준 ./discourse-setup 절차 외에 사용자 정의 설정 변경은 하지 않았습니다.

이를 어떻게 구현할 수 있는지 조언을 주시면 감사하겠습니다.

도움 주셔서 감사합니다! 커뮤니티의 팁이나 모범 사례를 기대하고 있습니다. :smiling_face_with_three_hearts:

The easiest way is this Add files to root directory - #3 by fang

If it checks just for something in the file (rather than expecting the output to be exactly that file), you can add that text to a topic and then use a permalink redirect to make /xx.txt redirect to the topic.

… to the raw content, specifically, e.g.: https://meta.discourse.org/raw/345460/4

Right! I think that’s exactly what I told someone to do some years ago.

I periodically seem to forget that /raw/ path somehow.

So you just need to create a public topic with the text in it. You can unlist it so that it doesn’t show up in searches. As long as whatever is following the redirects, it should Just Work.

귀하의 프롬프트와 효과적인 지원은 나에게 정말 큰 도움이 되었으며, 해결책을 찾는 데 기울여 주신 시간과 노력에 감사드립니다.
다시 한번 감사드립니다!!!!!