503 Commits

Author SHA1 Message Date
iacore a0cc4ab7e7 log to stderr with better format 2024-08-28 13:58:12 +00:00
iacore 7fe69e9cd2 Log spans 2024-08-28 13:52:28 +00:00
iacore 66e30503ef differentiate between traced spans 2024-08-28 13:36:47 +00:00
iacore dacd337aec Add tracing 2024-08-28 13:32:02 +00:00
iacore 79bd4fdac3 fix type errors 2024-08-28 12:29:26 +00:00
VnPower 34cbf82922 Update MkDocs image to latest 2024-08-28 19:20:13 +07:00
VnPower 5c0330cb53 Fix CI path matching regex 2024-08-28 19:11:55 +07:00
iacore 910a690e40 add docs 2024-08-28 11:59:48 +00:00
iacore 8dc0562cb0 centralize logging 2024-08-28 11:56:25 +00:00
iacore 91bc82e04f centralize logging 2024-08-28 11:45:30 +00:00
iacore 954de77eb2 fix net/http usage
correct usage:
1. WriteHeader
2. Write
2024-08-28 11:29:57 +00:00
iacore 6c39e74e1a log every request to pixiv 2024-08-28 11:20:41 +00:00
VnPower aa8ea7a808 Complete limiter middleware 2024-08-28 18:16:07 +07:00
iacore c6ddcd99a8 clean up requests, move everything into core/requests.go 2024-08-28 10:56:27 +00:00
iacore 06ea915201 Prevent cookie injection 2024-08-28 10:40:52 +00:00
iacore 00bb67eb4f clean up handlers 2024-08-28 10:34:54 +00:00
iacore 1356245aff separate out error handler 2024-08-28 10:20:17 +00:00
iacore fa8677f32c move CSP header to only apply to HTML pages 2024-08-28 10:09:16 +00:00
iacore b5d856803c catch error and restore headers properly 2024-08-28 10:03:59 +00:00
VnPower 2b8b6ec4c1 Update 2024-08-28 16:07:32 +07:00
VnPower f8abc5c3b2 Remove junk 2024-08-28 12:00:10 +07:00
VnPower 4950bd1777 Add base for limiter 2024-08-28 11:59:54 +07:00
VnPower ead778218c Move the proxy checker up 2024-08-28 10:32:33 +07:00
VnPower 463d2e448d Fix some novel settings 2024-08-28 10:20:23 +07:00
iacore 4dc6c8c752 Use cascadia for css selector 2024-08-27 21:30:47 +00:00
iacore bbf4f2f2b1 clean up 2024-08-27 21:12:32 +00:00
iacore 289628edac vnpower please check this 2024-08-27 21:04:33 +00:00
iacore 4876fd5a3a reorganize docs 2024-08-27 21:01:40 +00:00
iacore 00a060caa6 fix redirect 2024-08-27 20:26:24 +00:00
iacore 7b8fb618eb write about caching 2024-08-27 20:23:39 +00:00
iacore fbdf1f78f2 organize files
add http client with better maxidleconnections
2024-08-27 19:54:37 +00:00
iacore 26639d26ca cache proxied images by forwarding headers 2024-08-27 19:35:22 +00:00
iacore 765bdd41c0 remove CompatRequest 2024-08-27 16:42:29 +00:00
iacore 17b3aa269b clean up redirect codes 2024-08-27 16:26:48 +00:00
iacore cedf7179fc replace ?r=/redirect_to with something else.
can't shake the fakey feeling. net/http expects one handler max. the way we currently detect redirect param is not one handler.
      we should refactor the code out to be called from different handlers
      also, wtf is /settings/novelFontType?noredirect=t&r=  (redirect or no redirect?)
      suggestion: Use Referer. the header exists for a reason. might need to turn off CSP for that.
2024-08-27 16:21:17 +00:00
iacore 2e4ac50f69 clean up 2024-08-27 15:44:39 +00:00
iacore 6db751e8bd mostly done 2024-08-27 15:15:54 +00:00
iacore 12be0ce3fc all type check, no panic 2024-08-27 14:49:19 +00:00
iacore 68deed7e00 clean up 2024-08-27 14:27:31 +00:00
iacore 2b4587221f fix all type errors 2024-08-27 14:26:48 +00:00
iacore baeb7531e1 fix more 2024-08-27 14:11:03 +00:00
iacore 97ee0c2721 fix more 2024-08-27 14:08:39 +00:00
iacore bd579d3b84 fix http.NewRequest with context 2024-08-27 14:04:17 +00:00
iacore 13e0bcee7b ++ 2024-08-27 13:56:14 +00:00
iacore 4dfebd0ee7 update 2024-08-27 13:50:15 +00:00
iacore b8d8d1b589 fix it more 2024-08-27 13:49:13 +00:00
VnPower b894f4984b Remove duplicated imports and fix cookies? 2024-08-27 19:52:04 +07:00
iacore 60af2887fd remove last panic in http handler 2024-08-27 12:49:08 +00:00
iacore e09d437bfe add tip 2024-08-27 12:30:20 +00:00
iacore 36bbbf6a90 convert part of main.go 2024-08-27 12:27:51 +00:00