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

View File

@ -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

View File

@ -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).

View File

@ -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(())
}

View File

@ -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);