Skip to content

Commit

Permalink
Merge branch 'dev' into feature/meta-iframely
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Sep 2, 2024
2 parents 95a7330 + 17afb46 commit 1bef2f4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM node:17.8-alpine3.15
FROM node:22-alpine

EXPOSE 8061

WORKDIR /iframely

# Create new non-root user
RUN addgroup -S iframelygroup && adduser -S iframely -G iframelygroup
RUN addgroup --system iframelygroup && adduser --system iframely -G iframelygroup
RUN apk add g++ make python3

# This will change the config to `config.<VALUE>.js` and the express server to change its behaviour.
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ PUBLISHPORT := ${EXPOSEPORT}

build:
git checkout main
git pull --rebase upstream main
git branch -f tag-${VERSION}
git checkout tag-${VERSION}
docker \
Expand Down
9 changes: 7 additions & 2 deletions plugins/domains/facebook.com/facebook.thumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,17 @@ export default {
},


getData: function(oembed, options) {
getData: function(oembed, url, options) {

if (oembed.html && /class=\"fb\-(post|video)\"/i.test(oembed.html)
&& options.getProviderOptions('facebook.thumbnail', true) && !/comment_id=/.test(oembed.html)) {

options.followHTTPRedirect = true; // avoid security re-directs of URLs if any
// Avoid security re-directs of URLs if any,
// but fix canonical URLs for /share urls that now redirect to story.php
if (!/facebook\.com\/(permalink|story)\.php\?/i.test(url)) {
options.followHTTPRedirect = true;
}

options.exposeStatusCode = true;
options.provider = 'Facebook';

Expand Down

0 comments on commit 1bef2f4

Please sign in to comment.