Skip to content

Commit

Permalink
Manual Cloudflare Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
seadfeng committed Aug 6, 2024
1 parent e62b609 commit 8b84a2f
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ Store sensitive information as secrets in your GitHub repository. Navigate to yo

## Manual Cloudflare Setup

For detailed instructions, see [this guide](https://github.com/gaboolic/cloudflare-reverse-proxy) (in Chinese).

Source: [gaboolic/cloudflare-reverse-proxy](<https://github.com/gaboolic/cloudflare-reverse-proxy)>)
For detailed instructions, see [this guide](workers.dev/README.md)

## Configure Workers for Proxy Site

Expand Down
41 changes: 41 additions & 0 deletions workers.dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Manual Cloudflare Setup

## 1. Open Workers & Pages

![Open Workers & Pages](images/create1.png)


## 2. Create Worker

![Create Worker](images/create2.png)


## 3. Deploy Worker

![Deploy Worker](images/deploy.png)


## 4. Edit Code

![Edit Code 1](images/edit.png)


Copy your code to editor [workers.dev/index.js](index.js) or [index.js](../index.js)

### workers.dev/index.js

In this case, you will need change the code:

```js
// workers.dev/index.js
// replace to your proxy site domain
const proxySite = 'example.com';
```

![Edit Code 2](images/edit2.png)


## Done and Preview


![Done and Preview](images/done.png)
Binary file added workers.dev/images/create1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added workers.dev/images/create2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added workers.dev/images/deploy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added workers.dev/images/done.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added workers.dev/images/edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added workers.dev/images/edit2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions workers.dev/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// workers.dev/index.js
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));
});
Expand Down

0 comments on commit 8b84a2f

Please sign in to comment.