diff --git a/host/docker/README.md b/host/docker/README.md index 9663c82a..85ec1264 100644 --- a/host/docker/README.md +++ b/host/docker/README.md @@ -4,7 +4,7 @@ The official Dnote docker image. ## Installing Dnote Server Using Docker -*Installing Dnote through Docker is currently in beta.* For the an alternative installation guide, please see [the installation guide](https://github.com/dnote/dnote/blob/master/SELF_HOST.md). +*Installing Dnote through Docker is currently in beta.* For the an alternative installation guide, please see [the installation guide](https://github.com/dnote/dnote/blob/master/SELF_HOSTING.md). ### Steps diff --git a/host/docker/docker-compose.yml b/host/docker/docker-compose.yml index 9e75eaa5..edcf1b51 100644 --- a/host/docker/docker-compose.yml +++ b/host/docker/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always dnote: - image: dnote/test:testing + image: dnote/dnote environment: GO_ENV: PRODUCTION DBSkipSSL: "true" diff --git a/pkg/server/handlers/routes.go b/pkg/server/handlers/routes.go index b5ac7a2e..7efb1b95 100644 --- a/pkg/server/handlers/routes.go +++ b/pkg/server/handlers/routes.go @@ -279,7 +279,7 @@ func logging(inner http.Handler) http.HandlerFunc { inner.ServeHTTP(&lw, r) log.WithFields(log.Fields{ - "remoteAddr": r.RemoteAddr, + "remoteAddr": lookupIP(r), "uri": r.RequestURI, "statusCode": lw.statusCode, "method": r.Method, @@ -377,16 +377,16 @@ func NewRouter(app *App) (*mux.Router, error) { {"PATCH", "/classic/set-password", app.auth(app.classicSetPassword, nil), true}, // v3 - {"GET", "/v3/sync/fragment", cors(app.auth(app.GetSyncFragment, &proOnly)), true}, - {"GET", "/v3/sync/state", cors(app.auth(app.GetSyncState, &proOnly)), true}, + {"GET", "/v3/sync/fragment", cors(app.auth(app.GetSyncFragment, &proOnly)), false}, + {"GET", "/v3/sync/state", cors(app.auth(app.GetSyncState, &proOnly)), false}, {"OPTIONS", "/v3/books", cors(app.BooksOptions), true}, {"GET", "/v3/books", cors(app.auth(app.GetBooks, &proOnly)), true}, {"GET", "/v3/books/{bookUUID}", cors(app.auth(app.GetBook, &proOnly)), true}, - {"POST", "/v3/books", cors(app.auth(app.CreateBook, &proOnly)), true}, + {"POST", "/v3/books", cors(app.auth(app.CreateBook, &proOnly)), false}, {"PATCH", "/v3/books/{bookUUID}", cors(app.auth(app.UpdateBook, &proOnly)), false}, {"DELETE", "/v3/books/{bookUUID}", cors(app.auth(app.DeleteBook, &proOnly)), false}, {"OPTIONS", "/v3/notes", cors(app.NotesOptions), true}, - {"POST", "/v3/notes", cors(app.auth(app.CreateNote, &proOnly)), true}, + {"POST", "/v3/notes", cors(app.auth(app.CreateNote, &proOnly)), false}, {"PATCH", "/v3/notes/{noteUUID}", app.auth(app.UpdateNote, &proOnly), false}, {"DELETE", "/v3/notes/{noteUUID}", app.auth(app.DeleteNote, &proOnly), false}, {"POST", "/v3/signin", cors(app.signin), true},