mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-01 18:31:35 +00:00
Optional Tor support
This commit is contained in:
parent
b944042fe0
commit
96fa4758c0
11 changed files with 597 additions and 125 deletions
|
|
@ -3,8 +3,6 @@ const {request} = require("../../lib/utils/request")
|
|||
const {proxy} = require("pinski/plugins")
|
||||
const sharp = require("sharp")
|
||||
|
||||
const VERIFY_SUCCESS = Symbol("VERIFY_SUCCESS")
|
||||
|
||||
/**
|
||||
* Check that a resource is on Instagram.
|
||||
* @param {URL} completeURL
|
||||
|
|
@ -38,7 +36,7 @@ module.exports = [
|
|||
Some thumbnails aren't square and would otherwise be stretched on the page without this.
|
||||
If I cropped the images client side, it would have to be done with CSS background-image, which means no <img srcset>.
|
||||
*/
|
||||
return request(verifyResult.url).then(res => {
|
||||
return request(verifyResult.url, {}, {log: false}).then(res => {
|
||||
const converter = sharp().resize(width, width, {position: "entropy"})
|
||||
return {
|
||||
statusCode: 200,
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ body
|
|||
color: #111
|
||||
background-color: rgba(40, 40, 40, 0.25)
|
||||
text-decoration: none
|
||||
overflow: hidden
|
||||
@include sized
|
||||
|
||||
&:hover
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ subdirs("pug", (err, dirs) => {
|
|||
pinski.addAPIDir("html/static/js/templates/api")
|
||||
pinski.addSassDir("sass")
|
||||
pinski.addAPIDir("api")
|
||||
pinski.muteLogsStartingWith("/imageproxy")
|
||||
pinski.muteLogsStartingWith("/videoproxy")
|
||||
pinski.muteLogsStartingWith("/static")
|
||||
pinski.startServer()
|
||||
pinski.enableWS()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue