Fix ratelimit (#321)

* Allow to synchronize large number of records

* Fix link

* Unexport

* Fix docker
This commit is contained in:
Sung Won Cho 2019-11-19 12:52:47 +08:00 committed by GitHub
commit b5630adc88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

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

View file

@ -12,7 +12,7 @@ services:
restart: always
dnote:
image: dnote/test:testing
image: dnote/dnote
environment:
GO_ENV: PRODUCTION
DBSkipSSL: "true"

View file

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