> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/vi/cau-hinh/overleaf-toolkit/external-url.md).

# URL bên ngoài

### tính năng "From External URL"

Để bật ["From External URL"](https://www.overleaf.com/learn/how-to/How_to_upload_a_file_using_an_external_URL) tính năng, biến `ENABLED_LINKED_FILE_TYPES` phải bao gồm `url` loại:

```
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url
```

Điều này sẽ mở rộng cả *Thêm tệp* menu và *Chèn hình* menu thả xuống trong thanh công cụ:  *Thêm tệp* menu cho phép bạn thêm một tệp vào dự án của bạn bằng URL của nó, trong khi *Chèn hình* menu thả xuống cho phép bạn chèn một hình ảnh vào tài liệu trực tiếp từ URL của nó.

#### Lưu ý bảo mật

Khi người dùng thêm liên kết đến một tệp bên ngoài trong dự án của họ, tệp đó sẽ được truy xuất thay mặt cho máy chủ nơi Overleaf được cài đặt.

Nếu máy chủ Overleaf được lưu trữ trong một mạng riêng cũng chứa các máy chủ HTTP nội bộ (chỉ dành cho mục đích sử dụng nội bộ), thì người dùng có quyền truy cập Overleaf có thể truy cập dữ liệu từ các dịch vụ nội bộ này.

Để ngăn điều này, các liên kết đến tệp bên ngoài không được trỏ tới các máy chủ có địa chỉ IP thuộc bất kỳ dải mạng bị hạn chế nào. Các dải đó là:

* `127.0.0.0/8` (vòng lặp cục bộ)
* `169.254.0.0/16` (liên kết cục bộ)
* `10.0.0.0/8` (mạng riêng)
* `172.16.0.0/12` (mạng riêng)
* `192.168.0.0/16` (mạng riêng)

Ngoài ra, biến môi trường sau đây được giới thiệu:

* `OVERLEAF_LINKED_URL_BLOCKED_NETWORKS`
  * Một danh sách các mạng ở dạng CIDR, được phân tách bằng khoảng trắng, từ đó cấm truy xuất tài nguyên bên ngoài. Thông thường, danh sách này nên bao gồm mạng nội bộ của tổ chức.
    * Ví dụ: `OVERLEAF_LINKED_URL_BLOCKED_NETWORKS=123.123.0.0/16 124.124.124.0/24`

Tuy nhiên, trong nhiều tổ chức, các máy chủ trong mạng nội bộ cũng có thể lưu trữ dữ liệu nên được truy cập công khai. Để cho phép truy cập vào các tài nguyên cụ thể ngay cả khi toàn bộ mạng bị chặn, biến môi trường sau đây được cung cấp:

* `OVERLEAF_LINKED_URL_ALLOWED_RESOURCES`
  * Một biểu thức chính quy xác định các tài nguyên web được phép mà từ đó có thể truy xuất tệp bên ngoài. Nếu một URL khớp với biểu thức chính quy này, quyền truy cập sẽ được cấp ngay cả khi mạng của nó bị chặn theo cách khác.
    * Ví dụ: Để cho phép các URL như `https://www.example.com/~john/pictures/frog.jpg` và `http://www.example.com/public/whatever/lit.bib`:

      `OVERLEAF_LINKED_URL_ALLOWED_RESOURCES=^https?://www\.example\.com/(?:~[^/]+|public)(?:/.*)?`
    * Ví dụ: Để từ chối các URL như `http://www.example.com/private/whatever/file`, trong khi cho phép tất cả các tài nguyên khác không nằm trong `riêng tư` cây con:

      `OVERLEAF_LINKED_URL_ALLOWED_RESOURCES=^https?://www\.example\.com/(?!private)(?:.*)`<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/vi/cau-hinh/overleaf-toolkit/external-url.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
