mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
Use master branch, ignore local db, and use CORS.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
Rocket.toml
|
||||
/target
|
||||
**/*.rs.bk
|
||||
.mongo
|
||||
.env
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1960,7 +1960,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revolt"
|
||||
version = "0.2.11"
|
||||
version = "0.3.0-alpha"
|
||||
dependencies = [
|
||||
"bcrypt",
|
||||
"bitfield",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "revolt"
|
||||
version = "0.2.11"
|
||||
version = "0.3.0-alpha"
|
||||
authors = ["Paul Makles <paulmakles@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -12,9 +12,9 @@ many-to-many = "0.1.2"
|
||||
#rauth = { git = "https://gitlab.insrt.uk/insert/rauth" }
|
||||
|
||||
hive_pubsub = { version = "0.4.1", features = ["mongo"] }
|
||||
rocket_cors = { git = "https://github.com/lawliet89/rocket_cors" }
|
||||
rocket_contrib = { git = "https://github.com/SergioBenitez/Rocket" }
|
||||
rocket = { git = "https://github.com/SergioBenitez/Rocket", default-features = false }
|
||||
rocket_cors = { git = "https://github.com/lawliet89/rocket_cors", branch = "master" }
|
||||
rocket_contrib = { git = "https://github.com/SergioBenitez/Rocket", branch = "master" }
|
||||
rocket = { git = "https://github.com/SergioBenitez/Rocket", branch = "master", default-features = false }
|
||||
mongodb = { version = "1.1.1", features = ["tokio-runtime"], default-features = false }
|
||||
|
||||
once_cell = "1.4.1"
|
||||
|
||||
@@ -36,9 +36,11 @@ async fn main() {
|
||||
..Default::default()
|
||||
}
|
||||
.to_cors()
|
||||
.unwrap();
|
||||
.expect("Failed to create CORS.");
|
||||
|
||||
routes::mount(rocket::ignite())
|
||||
.mount("/", rocket_cors::catch_all_options_routes())
|
||||
.manage(cors.clone())
|
||||
.attach(cors)
|
||||
.launch()
|
||||
.await
|
||||
|
||||
@@ -7,7 +7,7 @@ use mongodb::bson::doc;
|
||||
#[get("/")]
|
||||
pub async fn root() -> Response {
|
||||
Response::Success(json!({
|
||||
"revolt": "0.2.11",
|
||||
"revolt": "0.3.0-alpha",
|
||||
"features": {
|
||||
"registration": !*DISABLE_REGISTRATION,
|
||||
"captcha": {
|
||||
|
||||
Reference in New Issue
Block a user