Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

HTML の取得

リモートサーバーへリクエストを送り、レスポンスから HTML を読み取り、その HTML を配信します。

最終更新 Markdown で表示Agent セットアップ

すぐに始める場合は、次のボタンを選択します。

Cloudflare にデプロイ

GitHub アカウントにリポジトリが作成され、アプリケーションが Cloudflare Workers にデプロイされます。

export default {
  async fetch(request) {
    /**
     * `remote` を、リクエストを送りたいホストに置き換えます
     */
    const remote = "https://example.com";

    return await fetch(remote, request);
  },
};
export default {
	async fetch(request: Request): Promise<Response> {
		/**
		 * Replace `remote` with the host you wish to send requests to
		 */
		const remote = "https://example.com";

		return await fetch(remote, request);
	},
};
from workers import WorkerEntrypoint
from js import fetch

class Default(WorkerEntrypoint):
    async def fetch(self, request):
        # Replace `remote` with the host you wish to send requests to
        remote = "https://example.com"
        return await fetch(remote, request)
import { Hono } from "hono";

const app = new Hono();

app.all("*", async (c) => {
	/**
	 * Replace `remote` with the host you wish to send requests to
	 */
	const remote = "https://example.com";

	// Forward the request to the remote server
	return await fetch(remote, c.req.raw);
});

export default app;

役に立ちましたか?