Skip to content

Commit e383f03

Browse files
committed
updated README.md
1 parent 5a8b7ed commit e383f03

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Then, start a CGI server:
4848
npx cgi-server --filePath ./cgi-bin
4949
```
5050

51-
# Basic Usage
51+
## Basic Usage
5252

5353
Here’s an example of how to set up a CGI server with `cgi-core`:
5454

@@ -83,15 +83,15 @@ app.listen(3000);
8383

8484
Usage example using [Express](https://github.com/lfortin/node-cgi-core/blob/master/docs/express.md).
8585

86-
# Configuration options
86+
## Configuration options
8787

8888
### urlPath
8989

90-
Base url for routing. Default: '/cgi-bin'
90+
Base url for routing. Default: `'/cgi-bin'`
9191

9292
### filePath
9393

94-
File path where the CGI scripts are located. It is strongly advised to set a value for `filePath` (example: './cgi-bin'). Default: `process.cwd()`
94+
File path where the CGI scripts are located. It is strongly advised to set a value for `filePath` (example: `'./cgi-bin'`). Default: `process.cwd()`
9595

9696
### extensions
9797

@@ -117,7 +117,7 @@ Default:
117117
118118
### indexExtension
119119

120-
File extension to lookup for an index CGI script in any given directory. Default: 'js'
120+
File extension to lookup for an index CGI script in any given directory. Default: `'js'`
121121

122122
### debugOutput
123123

@@ -202,7 +202,7 @@ Default: `false`
202202

203203
> ⚠️ **Important:** Only enable this if you are **running behind a trusted reverse proxy** (like Nginx or a load balancer). Enabling `trustProxy` when exposed to the public internet can allow **header spoofing** by clients.
204204
205-
# Start a CGI Server from the Command Line
205+
## Start a CGI Server from the Command Line
206206

207207
The command `cgi-server` can be used to run an HTTP server to serve CGI scripts.
208208

@@ -231,7 +231,7 @@ npx cgi-server --port 3001 --urlPath /cgi-bin --filePath ./cgi-bin
231231
-l, --logRequests Log HTTP requests to STDOUT
232232
```
233233

234-
# Supported CGI environment variables
234+
## Supported CGI environment variables
235235

236236
In addition to the standard HTTP-related variables, the following CGI environment variables are supported:
237237

@@ -255,7 +255,7 @@ SERVER_PROTOCOL
255255
SERVER_SOFTWARE
256256
```
257257

258-
# 🔁 Using a Reverse Proxy (e.g., Nginx)
258+
## 🔁 Using a Reverse Proxy (e.g., Nginx)
259259

260260
While `cgi-core` is capable of serving CGI scripts directly over HTTP/1.1, it's often recommended to use a **reverse proxy** like **Nginx** in front of your Node.js server for:
261261

@@ -268,7 +268,7 @@ While `cgi-core` is capable of serving CGI scripts directly over HTTP/1.1, it's
268268

269269
Below is an example Nginx configuration that:
270270

271-
- Proxies `/cgi-bin` requests to the Node.js/`cgi-core` server running on `localhost:3001`
271+
- Proxies `/cgi-bin` requests to the Node.js/cgi-core server running on `localhost:3001`
272272
- Enables **caching** for `GET` responses
273273
- Serves static assets directly from the filesystem with browser caching
274274

@@ -321,7 +321,7 @@ http {
321321
}
322322
```
323323

324-
# License
324+
## License
325325

326326
`cgi-core` is released under the [MIT License](https://github.com/lfortin/node-cgi-core/blob/master/LICENSE).
327327

0 commit comments

Comments
 (0)