mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-21 16:59:06 -05:00
docs: cleanup location of documentation
This commit is contained in:
parent
136e41d234
commit
40abd6858e
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
|||
/target
|
||||
**/target/
|
||||
nostr.db
|
||||
|
|
|
@ -139,7 +139,7 @@ settings.
|
|||
|
||||
For examples of putting the relay behind a reverse proxy (for TLS
|
||||
termination, load balancing, and other features), see [Reverse
|
||||
Proxy](reverse-proxy.md).
|
||||
Proxy](docs/reverse-proxy.md).
|
||||
|
||||
## Dev Channel
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ http {
|
|||
|
||||
### Nginx Notes
|
||||
|
||||
The above configuration was tested on `nginx` `1.18.0` was tested on `Ubuntu 20.04`.
|
||||
The above configuration was tested on `nginx` `1.18.0` on `Ubuntu` `20.04` and `22.04`
|
||||
|
||||
For help installing `nginx` on `Ubuntu`, see [this guide](https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04).
|
||||
|
|
@ -2,9 +2,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
tonic_build::configure()
|
||||
.build_server(false)
|
||||
.protoc_arg("--experimental_allow_proto3_optional")
|
||||
.compile(
|
||||
&["../proto/nauthz.proto"],
|
||||
&["../proto"],
|
||||
)?;
|
||||
.compile(&["../../proto/nauthz.proto"], &["../../proto"])?;
|
||||
Ok(())
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
use tonic::{transport::Server, Request, Response, Status};
|
||||
|
||||
use nauthz_grpc::authorization_server::{Authorization, AuthorizationServer};
|
||||
use nauthz_grpc::{EventReply, EventRequest, Decision};
|
||||
use nauthz_grpc::{Decision, EventReply, EventRequest};
|
||||
|
||||
pub mod nauthz_grpc {
|
||||
tonic::include_proto!("nauthz");
|
||||
|
@ -14,7 +14,6 @@ pub struct EventAuthz {
|
|||
|
||||
#[tonic::async_trait]
|
||||
impl Authorization for EventAuthz {
|
||||
|
||||
async fn event_admit(
|
||||
&self,
|
||||
request: Request<EventRequest>,
|
||||
|
@ -30,7 +29,7 @@ impl Authorization for EventAuthz {
|
|||
println!("This looks fine! (kind={})", event.kind);
|
||||
reply = nauthz_grpc::EventReply {
|
||||
decision: Decision::Permit as i32,
|
||||
message: None
|
||||
message: None,
|
||||
};
|
||||
} else {
|
||||
println!("Blocked! (kind={})", event.kind);
|
Loading…
Reference in New Issue
Block a user