Skip to content

Commit 14b087c

Browse files
authored
🌐 Add Korean translation for docs/ko/docs/advanced/wsgi.md (fastapi#12659)
1 parent 42c002e commit 14b087c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docs/ko/docs/advanced/wsgi.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# WSGI 포함하기 - Flask, Django 그 외
2+
3+
[서브 응용 프로그램 - 마운트](sub-applications.md){.internal-link target=_blank}, [프록시 뒤편에서](behind-a-proxy.md){.internal-link target=_blank}에서 보았듯이 WSGI 응용 프로그램들을 다음과 같이 마운트 할 수 있습니다.
4+
5+
`WSGIMiddleware`를 사용하여 WSGI 응용 프로그램(예: Flask, Django 등)을 감쌀 수 있습니다.
6+
7+
## `WSGIMiddleware` 사용하기
8+
9+
`WSGIMiddleware`를 불러와야 합니다.
10+
11+
그런 다음, WSGI(예: Flask) 응용 프로그램을 미들웨어로 포장합니다.
12+
13+
그 후, 해당 경로에 마운트합니다.
14+
15+
```Python hl_lines="2-3 23"
16+
{!../../docs_src/wsgi/tutorial001.py!}
17+
```
18+
19+
## 확인하기
20+
21+
이제 `/v1/` 경로에 있는 모든 요청은 Flask 응용 프로그램에서 처리됩니다.
22+
23+
그리고 나머지는 **FastAPI**에 의해 처리됩니다.
24+
25+
실행하면 <a href="http://localhost:8000/v1/" class="external-link" target="_blank">http://localhost:8000/v1/</a>으로 이동해서 Flask의 응답을 볼 수 있습니다:
26+
27+
```txt
28+
Hello, World from Flask!
29+
```
30+
31+
그리고 다음으로 이동하면 <a href="http://localhost:8000/v2" class="external-link" target="_blank">http://localhost:8000/v2</a> Flask의 응답을 볼 수 있습니다:
32+
33+
```JSON
34+
{
35+
"message": "Hello World"
36+
}
37+
```

0 commit comments

Comments
 (0)