docs: cleanup location of documentation

This commit is contained in:
Yuval Adam 2023-02-15 10:28:42 +02:00 committed by Greg Heartsfield
parent 136e41d234
commit 40abd6858e
7 changed files with 11 additions and 15 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
/target **/target/
nostr.db nostr.db

View File

@ -139,7 +139,7 @@ settings.
For examples of putting the relay behind a reverse proxy (for TLS For examples of putting the relay behind a reverse proxy (for TLS
termination, load balancing, and other features), see [Reverse termination, load balancing, and other features), see [Reverse
Proxy](reverse-proxy.md). Proxy](docs/reverse-proxy.md).
## Dev Channel ## Dev Channel

View File

@ -104,7 +104,7 @@ http {
### Nginx Notes ### 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). For help installing `nginx` on `Ubuntu`, see [this guide](https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04).

View File

@ -2,9 +2,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure() tonic_build::configure()
.build_server(false) .build_server(false)
.protoc_arg("--experimental_allow_proto3_optional") .protoc_arg("--experimental_allow_proto3_optional")
.compile( .compile(&["../../proto/nauthz.proto"], &["../../proto"])?;
&["../proto/nauthz.proto"],
&["../proto"],
)?;
Ok(()) Ok(())
} }

View File

@ -1,7 +1,7 @@
use tonic::{transport::Server, Request, Response, Status}; use tonic::{transport::Server, Request, Response, Status};
use nauthz_grpc::authorization_server::{Authorization, AuthorizationServer}; use nauthz_grpc::authorization_server::{Authorization, AuthorizationServer};
use nauthz_grpc::{EventReply, EventRequest, Decision}; use nauthz_grpc::{Decision, EventReply, EventRequest};
pub mod nauthz_grpc { pub mod nauthz_grpc {
tonic::include_proto!("nauthz"); tonic::include_proto!("nauthz");
@ -14,7 +14,6 @@ pub struct EventAuthz {
#[tonic::async_trait] #[tonic::async_trait]
impl Authorization for EventAuthz { impl Authorization for EventAuthz {
async fn event_admit( async fn event_admit(
&self, &self,
request: Request<EventRequest>, request: Request<EventRequest>,
@ -30,7 +29,7 @@ impl Authorization for EventAuthz {
println!("This looks fine! (kind={})", event.kind); println!("This looks fine! (kind={})", event.kind);
reply = nauthz_grpc::EventReply { reply = nauthz_grpc::EventReply {
decision: Decision::Permit as i32, decision: Decision::Permit as i32,
message: None message: None,
}; };
} else { } else {
println!("Blocked! (kind={})", event.kind); println!("Blocked! (kind={})", event.kind);