add CORS feature

This commit is contained in:
clowzed 2023-11-13 17:25:55 +03:00
parent d6e67e571e
commit 966f8a6abf

View file

@ -74,6 +74,7 @@ One key feature that it is self-hosted. This gives users more flexibility and co
- Custom 404.html `(on 404 status user will see your 404.html)` - Custom 404.html `(on 404 status user will see your 404.html)`
- Custom 503.html `new` `(on disabled site)` - Custom 503.html `new` `(on disabled site)`
- Clean urls - Clean urls
- CORS
## 🔌 Built With ## 🔌 Built With
- `Rust` - `Rust`
@ -167,6 +168,9 @@ password = ""
[server] [server]
url = "http://sero.com/" url = "http://sero.com/"
subdomain = "clowzed" subdomain = "clowzed"
[cors]
origins = []
``` ```
### ✏️ Changing `sero.toml` ### ✏️ Changing `sero.toml`
@ -181,6 +185,9 @@ password = ""
[server] [server]
url = "http://awesome.com/" url = "http://awesome.com/"
subdomain = "oursite" subdomain = "oursite"
[cors]
origins = ["*"] # list of origins you trust
``` ```
### ⬆️ Registration and uploading ### ⬆️ Registration and uploading