add CORS feature

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

View file

@ -28,24 +28,24 @@
- [🚀 Features](#-features) - [🚀 Features](#-features)
- [🔌 Built With](#-built-with) - [🔌 Built With](#-built-with)
- [⌨️ Getting Started](#-getting-started) - [⌨️ Getting Started](#-getting-started)
- [Prerequisites](#prerequisites) - [Prerequisites](#prerequisites)
- [Installation](#installation) - [Installation](#installation)
- [Clone this repository](#clone-this-repository) - [Clone this repository](#clone-this-repository)
- [✏️ Configure DNS records](#-configure-dns-records) - [✏️ Configure DNS records](#-configure-dns-records)
- [✏️ Configure `docker-compose.yml`](#-configure-docker-composeyml) - [✏️ Configure `docker-compose.yml`](#-configure-docker-composeyml)
- [🚀 Deploy](#-deploy) - [🚀 Deploy](#-deploy)
- [✨ Usage](#-usage) - [✨ Usage](#-usage)
- [Installing cli tool](#installing-cli-tool) - [Installing cli tool](#installing-cli-tool)
- [🆕 Creating and initializing folder](#-creating-and-initializing-folder) - [🆕 Creating and initializing folder](#-creating-and-initializing-folder)
- [🆕 Creating index.html](#-creating-indexhtml) - [🆕 Creating index.html](#-creating-indexhtml)
- [🔍 Inspecting `sero.toml`](#-inspecting-serotoml) - [🔍 Inspecting `sero.toml`](#-inspecting-serotoml)
- [✏️ Changing `sero.toml`](#-changing-serotoml) - [✏️ Changing `sero.toml`](#-changing-serotoml)
- [⬆️ Registration and uploading](#-registration-and-uploading) - [⬆️ Registration and uploading](#-registration-and-uploading)
- [Now your site is available at http://oursite.awesome.com/index.html](#now-your-site-is-available-at-httpoursiteawesomecomindexhtml) - [Now your site is available at http://oursite.awesome.com/index.html](#now-your-site-is-available-at-httpoursiteawesomecomindexhtml)
- [Advanced usage with `new` features](#advanced-usage-with-new-features) - [Advanced usage with `new` features](#advanced-usage-with-new-features)
- [📍 Roadmap](#-roadmap) - [📍 Roadmap](#-roadmap)
- [🧑‍🤝‍🧑 Contributing](#-contributing) - [🧑‍🤝‍🧑 Contributing](#-contributing)
- [Creating A Pull Request](#creating-a-pull-request) - [Creating A Pull Request](#creating-a-pull-request)
- [License](#license) - [License](#license)
- [Authors](#authors) - [Authors](#authors)
@ -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