allow avatars render

This commit is contained in:
Umputun
2018-06-05 11:37:24 -05:00
parent 81da79374a
commit f783737d51
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -25,9 +25,9 @@ type AutoBackup struct {
// Do runs daily export to local files, keeps up to keepMax backups for given siteID
func (ab AutoBackup) Do(ctx context.Context) {
log.Printf("[INFO] activate auto-backup for %s", ab.BackupLocation)
log.Printf("[INFO] activate auto-backup for %s under %s, duration %s", ab.SiteID, ab.BackupLocation, ab.Duration)
tick := time.NewTicker(ab.Duration)
log.Printf("[DEBUG] first backup at %s", time.Now().Add(ab.Duration))
log.Printf("[DEBUG] first backup for %s at %s", ab.SiteID, time.Now().Add(ab.Duration))
for {
select {
@@ -37,7 +37,7 @@ func (ab AutoBackup) Do(ctx context.Context) {
continue
}
ab.removeOldBackupFiles()
log.Printf("[DEBUG] next backup at %s", time.Now().Add(ab.Duration))
log.Printf("[DEBUG] next backup for %s at %s", ab.SiteID, time.Now().Add(ab.Duration))
case <-ctx.Done():
log.Printf("[WARN] terminated autobackup for %s", ab.SiteID)
return
+1 -1
View File
@@ -166,7 +166,7 @@ func (s *Rest) routes() chi.Router {
router.With(tollbooth_chi.LimitHandler(tollbooth.NewLimiter(50, nil))).
Get("/robots.txt", func(w http.ResponseWriter, r *http.Request) {
allowed := []string{"/find", "/last", "/id", "/count", "/counts", "/list", "/config", "/img"}
allowed := []string{"/find", "/last", "/id", "/count", "/counts", "/list", "/config", "/img", "/avatar"}
for i := range allowed {
allowed[i] = "Allow: /api/v1" + allowed[i]
}