Skip to content

Commit

Permalink
Updated read me
Browse files Browse the repository at this point in the history
  • Loading branch information
evg4b committed Feb 27, 2023
1 parent 53f2b76 commit 1515c08
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,34 @@ uncors --http-port 8080 --to 'https://github.com' --from 'http://localhost'
* `--config` - Configuration file with defined [mocks](#mocks)
* `--debug` - Show debug output.


## Configuration

```yaml
# Base configuration
http-port: 8080 # Local HTTP listened port.
mappings:
http://localhost:3000: https://githib.com
debug: false # Show debug output.
proxy: localhost:8080

# HTTPS configuration
https-port: 8081 # Local HTTPS listened port.
cert-file: ~/server.crt # Path to HTTPS certificate file.
key-file: ~/server.key # Path to matching for certificate private key.

#Mocks
mocks:
- path: /hello-word
response:
code: 200
raw-content: 'Hello word'
```
## Mocks
Uncors has endpoint mocks mechanism.
All mocks should be defined in yaml file and passed as parameter `--mocks`.
All mocks should be defined in yaml config file and passed as parameter `--mocks`.
Currently available path, method, queries and headers filters
(for more information see [gorilla/mux](https://github.com/gorilla/mux#matching-routes) route matching).

Expand Down

0 comments on commit 1515c08

Please sign in to comment.