Commit Graph

44 Commits

Author SHA1 Message Date
DIYgod
e2badbfa98 chore: module alias for all routes 2019-05-15 15:27:15 +08:00
DIYgod
c4cd0ab495 fix(chore): contentExpire not work 2019-05-13 00:24:48 +08:00
DIYgod
075a8d1864 feat: support setting expire time for content cache 2019-05-09 01:11:19 +08:00
Howel
274199e450 refactor: 将 Array.indexof !== -1 替换为 Array.includes (#2073) 2019-05-08 23:50:34 +08:00
DIYgod
8637eb06d2 feat(core): set access-control-allow-origin header to prevent abuse 2019-04-30 00:12:28 +08:00
DIYgod
c1f856391d feat(core): add public in cache-control header 2019-04-29 11:36:03 +08:00
DIYgod
847bb00a9e feat(core): set cache-control max-age equal to config.cacheExpire 2019-04-29 11:15:00 +08:00
DIYgod
801f75c732 feat(core): add edge and last-modified header, close #338 2019-04-26 11:59:17 +08:00
DIYgod
697c231f4e fix empty cache 2019-04-21 20:36:09 +08:00
DIYgod
ec9f9aa018 fix cache type 2019-04-21 20:19:54 +08:00
fwolf
f87fcdd004 修整两处格式错误 (#1873)
在转发 Telegram Channel 到 Mastodon 的过程中,发现有两处格式错误:

1. hashtag 和斜体内容, Mastodon 不支持,就变成 `<i>#tag</i>` 这样的形式了,版式很乱且没必要,这个一般用的也少,干脆就去掉了。
2. 在去除不可见字符的时候,应当保留回车 `\r \n` ,这样可以更好的保持排版格式。(源代码中参照的 stackoverflow 链接中的第二个,回答中的提示也有保留回车的选项,就套过来了。
2019-04-10 11:39:59 +08:00
DIYgod
567e73df77 avoid repeating setting cache 2019-03-28 00:29:05 +08:00
DIYgod
9e2b99f5ac revert log; fix repeating setting cache in readhub 2019-03-27 19:04:09 +08:00
DIYgod
5676607046 log 2019-03-27 18:57:12 +08:00
DIYgod
fa6d5b3abf log: more 2019-03-27 18:49:52 +08:00
DIYgod
ae20bb6731 log: fix 2019-03-27 18:14:44 +08:00
DIYgod
e3f61bb65c log: more info 2019-03-27 18:09:37 +08:00
DIYgod
fd71316675 log: fix 2019-03-27 18:02:23 +08:00
DIYgod
a21fc4bbc6 log: repeated key 2019-03-27 17:53:16 +08:00
DIYgod
d70cba4c8e fix filtering empty title, close #1808 2019-03-23 00:48:41 +08:00
DIYgod
5eab3a4a69 fix null cache type, close #1728 #1730 2019-03-12 14:44:28 +08:00
DIYgod
0ca946c705 fix default value of cache maxAge 2019-03-06 12:17:33 +08:00
Henry Wang
e1d91a591e del: line breaker handling in middleware (#1592)
* del: remove line breaker handling

As it's slowing down RSSHub drastically

* del: related test case

* feat: weibo line breaker handling
2019-02-21 15:24:55 +08:00
Henry Wang
7a0f3e3eb7 替换换行符为 <br> (#1523)
close #1522
2019-02-19 22:45:29 +08:00
DIYgod
a4760ad9dd remove useless code 2019-02-01 18:25:24 +08:00
DIYgod
c08d4481f0 lib: remove useless file 2019-01-31 17:30:30 +08:00
DIYgod
ab2028ffa2 lib: merge lur-cache and redis-cache module 2019-01-31 17:19:36 +08:00
DIYgod
8e75f8184a Merge commit 'ec5fa9ffcf4827ce5580299bc1ff61d870ae5386' 2019-01-31 15:32:48 +08:00
DIYgod
9afa5049d0 test: middleware/header 2019-01-31 15:12:54 +08:00
DIYgod
cc7d8ed4a1 remove sentry 2019-01-31 12:04:20 +08:00
Henry
ec5fa9ffcf Fix node-redis warning
node_redis: Deprecated: The SETEX command contains a argument of type Promise.
This is converted to "[object Promise]" by using .toString() now and will return an error from v.3.0 on.
Please handle this in your code to make sure everything works as you intended it to.
2019-01-30 21:06:07 +00:00
Henry
af00264e92 Update caching solution 2019-01-30 10:12:22 +00:00
Henry
47778c187d Merge remote-tracking branch 'DIYgod/master' into dev 2019-01-30 09:31:03 +00:00
DIYgod
42ed46532b test: middleware/debug 2019-01-29 18:22:59 +08:00
DIYgod
6ef8957e8f test: remove useless code 2019-01-29 17:15:02 +08:00
Henry
0bfa79e762 Update tryGet() and use default parameters 2019-01-28 21:21:22 +00:00
Henry
3b97b5fcb4 Implement persistent cache 2019-01-28 21:17:18 +00:00
Henry
7b4e1613be Fix redis ttl error 2019-01-25 18:46:55 +00:00
Henry
3dce787c47 Add refresh for redis cache 2019-01-24 22:50:32 +00:00
Henry
313fd8ef76 Add updateAgeOnGet to lru-cache 2019-01-24 22:05:36 +00:00
DIYgod
36eae92311 test: blacklist in middleware/access-control 2019-01-24 16:02:47 +08:00
DIYgod
6b74c3f974 test: api 2019-01-22 18:47:24 +08:00
DIYgod
d64ca7b724 fix Content-Type in cached response 2019-01-17 15:55:34 +08:00
DIYgod
38a90e29b0 optimize directory structure 2018-12-26 18:35:10 +08:00