Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 215 for host (0.14 sec)

  1. docs/en/docs/advanced/middleware.md

    ```
    
    ## `TrustedHostMiddleware`
    
    Enforces that all incoming requests have a correctly set `Host` header, in order to guard against HTTP Host Header attacks.
    
    ```Python hl_lines="2  6-8"
    {!../../../docs_src/advanced_middleware/tutorial002.py!}
    ```
    
    The following arguments are supported:
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 10 18:27:10 GMT 2023
    - 4K bytes
    - Viewed (0)
  2. docs_src/debugging/tutorial001.py

    import uvicorn
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def root():
        a = "a"
        b = "b" + a
        return {"hello world": b}
    
    
    if __name__ == "__main__":
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 223 bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/debugging.md

    따라서 섹션
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    이 실행됩니다.
    
    ---
    
    해당 모듈(파일)을 가져오면 이런 일이 발생하지 않습니다
    
    그래서 다음과 같은 다른 파일 `importer.py`가 있는 경우:
    
    ```Python
    from myapp import app
    
    # Some more code
    ```
    
    이 경우 `myapp.py` 내부의 자동 변수에는 값이 `"__main__"`인 변수 `__name__`이 없습니다.
    
    따라서 다음 행
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    은 실행되지 않습니다.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 04:18:08 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  4. docs/ru/docs/deployment/docker.md

    RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
    
    COPY ./app /code/app
    
    CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
    
    # Если используете прокси-сервер, такой как Nginx или Traefik, добавьте --proxy-headers
    # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--proxy-headers"]
    ```
    
    </details>
    
    ## Что такое "контейнер"
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 57.5K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/debugging.md

    </div>
    
    то встроенная переменная `__name__`, автоматически создаваемая Python в вашем файле, будет иметь значение строкового типа `"__main__"`.
    
    Тогда выполнится условие и эта часть кода:
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    будет запущена.
    
    ---
    
    Но этого не произойдет, если вы импортируете этот модуль (файл).
    
    Таким образом, если у вас есть файл `importer.py` с таким импортом:
    
    ```Python
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. docs/fr/docs/tutorial/debugging.md

    ```
    
    </div>
    
    alors la variable interne `__name__` de votre fichier, créée automatiquement par Python, aura pour valeur la chaîne de caractères `"__main__"`.
    
    Ainsi, la section :
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    va s'exécuter.
    
    ---
    
    Cela ne se produira pas si vous importez ce module (fichier).
    
    Par exemple, si vous avez un autre fichier `importer.py` qui contient :
    
    ```Python
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Mar 06 16:26:49 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/debugging.md

    , 📄:
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    🔜 🏃.
    
    ---
    
    👉 🏆 🚫 🔨 🚥 👆 🗄 👈 🕹 (📁).
    
    , 🚥 👆 ✔️ ➕1️⃣ 📁 `importer.py` ⏮️:
    
    ```Python
    from myapp import app
    
    # Some more code
    ```
    
    👈 💼, 🏧 🔢 🔘 `myapp.py` 🔜 🚫 ✔️ 🔢 `__name__` ⏮️ 💲 `"__main__"`.
    
    , ⏸:
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    🔜 🚫 🛠️.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  8. docs/pt/docs/deployment.md

    Nesse caso, seu `Dockerfile` poderia parecer assim:
    
    ```Dockerfile
    FROM python:3.7
    
    RUN pip install fastapi uvicorn
    
    EXPOSE 80
    
    COPY ./app /app
    
    CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
    ```
    
    ### Crie o código **FastAPI**
    
    * Crie um diretório `app` e entre nele.
    * Crie um arquivo `main.py` com:
    
    ```Python
    from fastapi import FastAPI
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Aug 18 16:16:54 GMT 2022
    - 16.8K bytes
    - Viewed (0)
  9. docs/pt/docs/deployment/https.md

        * Os conteúdos são criptografados, embora sejam enviados com o protocolo HTTP.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 05 10:40:05 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  10. docs/ko/docs/deployment/server-workers.md

            ```Python
            import uvicorn.workers.UvicornWorker
            ```
    
    * `--bind`: 구니콘이 관찰할 IP와 포트를 의미합니다. 콜론 (`:`)을 사용하여 IP와 포트를 구분합니다.
        * 만약에 `--bind 0.0.0.0:80` (구니콘 옵션) 대신 유비콘을 직접 실행하고 싶다면 `--host 0.0.0.0`과 `--port 80`을 사용해야 합니다.
    
    출력에서 각 프로세스에 대한 **PID** (process ID)를 확인할 수 있습니다. (단순한 숫자입니다)
    
    출력 내용:
    
    * 구니콘 **프로세스 매니저**는 PID `19499`로 실행됩니다. (직접 실행할 경우 숫자가 다를 수 있습니다)
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top