Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Cloudflare Docs
Log in

Welcome to Cloudflare

Explore guides and tutorials to start building on Cloudflare's platform

Build with Cloudflare

JavaScript
exportdefault{
asyncfetch(request){
constdata={
hello:"world",
};
returnResponse.json(data);
},
};
JavaScript
exportdefault{
asyncfetch(request){
/**
* Replace `remote` with the host you wish to send requests to
*/
constremote="https://example.com";
returnawaitfetch(remote,request);
},
};
JavaScript
exportdefault{
asyncfetch(request){
constdestinationURL="https://example.com";
conststatusCode=301;
returnResponse.redirect(destinationURL,statusCode);
},
};
JavaScript
exportdefault{
asyncfetch(request){
functionMethodNotAllowed(request){
returnnewResponse(`Method${request.method} not allowed.`,{
status:405,
headers:{
Allow:"GET",
},
});
}
// Only GET requests work with this proxy.
if (request.method!=="GET")returnMethodNotAllowed(request);
returnfetch(`https://example.com`);
},
};

Developer Platform section imageDeveloper Platform section image

Developer Platform

The Cloudflare Developer Platform provides a serverless execution environment that allows you to create entirely new applications or augment existing ones without configuring or maintaining infrastructure.



Other docs you might also like


Community

Share ideas, answers, code and compare notes with the Cloudflare community.

Open source

Cloudflare contributes to the open-source ecosystem in a variety of ways, including:

Blog

Get the latest news on Cloudflare products, technologies, and culture.


[8]ページ先頭

©2009-2026 Movatter.jp