> 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/ja/she-ding/overleaf-toolkit/external-url.md).

# 外部 URL

### "From External URL" 機能

有効にするには ["From External URL"](https://www.overleaf.com/learn/how-to/How_to_upload_a_file_using_an_external_URL) 機能では、変数 `ENABLED_LINKED_FILE_TYPES` を含める必要があります `URL` タイプ:

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

これにより、両方の *ファイルを追加* メニューとその *図を挿入* ツールバー内のドロップダウン: その *ファイルを追加* メニューでは、URL を使ってプロジェクトにファイルを追加できます。一方、 *図を挿入* ドロップダウンでは、URL から直接ドキュメントに画像を挿入できます。

#### セキュリティに関する注意

ユーザーがプロジェクトに外部ファイルへのリンクを追加すると、そのファイルは Overleaf がインストールされているサーバーに代わって取得されます。

Overleaf サーバーが、社内専用の HTTP サーバーも含むプライベートネットワーク内でホストされている場合、Overleaf にアクセスできるユーザーはこれらの内部サービスのデータにアクセスできてしまう可能性があります。

これを防ぐため、外部ファイルへのリンクは、IP アドレスが制限対象のネットワーク範囲のいずれかに属するサーバーを指してはなりません。対象は次のとおりです:

* `127.0.0.0/8` (ループバック)
* `169.254.0.0/16` (リンクローカル)
* `10.0.0.0/8` (プライベートネットワーク)
* `172.16.0.0/12` (プライベートネットワーク)
* `192.168.0.0/16` (プライベートネットワーク)

さらに、次の環境変数が導入されます:

* `OVERLEAF_LINKED_URL_BLOCKED_NETWORKS`
  * 外部リソースの取得を禁止する、CIDR 表記のネットワークの空白区切りリストです。通常は、組織の内部ネットワークを含める必要があります。
    * 例: `OVERLEAF_LINKED_URL_BLOCKED_NETWORKS=123.123.0.0/16 124.124.124.0/24`

しかし、多くの組織では、内部ネットワーク内のサーバーが公開アクセス可能であるべきデータをホストしている場合もあります。ネットワーク全体がブロックされている場合でも特定のリソースへのアクセスを許可するために、次の環境変数が用意されています:

* `OVERLEAF_LINKED_URL_ALLOWED_RESOURCES`
  * 外部ファイルの取得元として許可される Web リソースを定義する正規表現です。URL がこの正規表現に一致する場合、そのネットワークが他ではブロックされていてもアクセスが許可されます。
    * 例: 次のような URL を許可するには `https://www.example.com/~john/pictures/frog.jpg` および `http://www.example.com/public/whatever/lit.bib`:

      `OVERLEAF_LINKED_URL_ALLOWED_RESOURCES=^https?://www\.example\.com/(?:~[^/]+|public)(?:/.*)?`
    * 例: 次のような URL を拒否するには `http://www.example.com/private/whatever/file`、一方で、次の以外のすべてのリソースを許可しつつ `非公開` サブツリー:

      `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/ja/she-ding/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.
