ReplyGif

I’m currently using this: GitHub - davidmh/discourse-giphy: Giphy integration for discourse

「いいね!」 1

The plugin has been updated to support SVG icons with Font Awesome 5

「いいね!」 2

I’ve added this plugin following the guidelines on the github page, but it doesn’t work! I’ve also added it under hooks, but the problem persists. How can I properly install it, or uninstall if it doesn’t work eventually? Thanks in advance!

To uninstall, you simply remove it from your app.yml.

Are you running on HTTPS? Did you add the template to support a reverse proxy?

「いいね!」 3

Fixed! Thank you very much!

「いいね!」 3

Thanks for this great plugin.

I just have a little issue, the icon to insert a Gif doesn’t appear in the window, do you have any idea where it could come from ?

Core’s icons changed to be based on fontawesome 5 sets, which is probably why the icon’s missing. The plugin would need to be updated here to support it.

「いいね!」 3

I don’t think that is it… it already supports FA 5.

「いいね!」 3

On latest, on my sandbox, the icon works fine…

I need to know the Discourse version and if there are any console related errors on your site.

「いいね!」 4

So… is this still working for anyone?

I didn’t take a look at this plugin for a few years but today I did… and the world is https now - after using the reverse proxy solution the JSON that is returned still has URL’s with http:// in them, so they are not showing because of mixed content?

「いいね!」 4

Update: we’ve fixed the above issue by doing the following in our nginx config.
(Disclaimer: I don’t know if the docker image includes the ngx_http_sub_module)

  location /replygif/ {
        proxy_pass http://replygif.net/;
        proxy_set_header Accept-Encoding "";
        sub_filter http://replygif.net/ /replygif/;
        sub_filter_once off;
        sub_filter_types application/json;
  }

The API URL in your settings should be https://yourforumname/replygif/api/ if you use this.

@PaulinaMX this is working on your forum now

「いいね!」 7

@RGJ Thank you very much :heart: the categories are working perfectly, only it seems that the tags are not working.

That seems to be an issue in the plugin itself. @cpradio do you have any idea?

「いいね!」 1

@cpradio We need you :heart:

これで blocked:mixed-content は解決しますか?現在のブラウザでは、HTTPS のウェブサイトから HTTP コンテンツがブロックされるためです。

プロキシの手順に従ってください。

README には HTTPS に関するセクションがあります。

TL;DR: プロキシ設定は存在しますが、問題の解決にはなりません。プロキシを経由しないリンクが依然として取得されるためです。

詳細:

サーバーを検査したところ、ご指示通り設定されていることを確認しました。コンテナ自体に入り、discourse.conf を確認したところ、proxy pass が適切に設定されていることが分かりました。

Chromium の開発者ツール(Network)を使用すると、https://mycompany.com/replygif/gifs?api-key=39YAprx5Yi&reply=Angry のようなクエリがプロキシを通過しているのが確認できます。これにより JSON が返され、http://replygif.net/i/1032.gif のような URL が含まれています。

その後、クライアントブラウザからのネットワーク接続で、http://replygif.net/thumbnail/176.gif のようなサムネイルがリクエストされます。これは明らかに失敗します。なぜなら、CSP が混合コンテンツ(http + https)をブロックするからです。

Ember.js アプリケーションの仕組みは分かりませんが、ネットワークトラフィックから推測すると、画像 URL が含まれる JSON を取得するクエリがあり、それが後にサムネイルの取得に使用されているようです。しかし、これらの画像リンク自体は機能せず、proxy pass ではこの問題を解決できません。

これを解決するには、Ember アプリ自体を構成して、これらの URL 参照をプロキシ経由の同じ参照 URL に書き換える必要があります。例えば、https://mycompany.com/replygif/thumbnail/176.gif のようにです。

ご意見やご提案はありますか?

「いいね!」 1

それについてはどうしようもないようです。replygif はまだ HTTPS をサポートしていないようですから。

「いいね!」 2

私はこれらについては初心者ですが、このプラグインのリバースプロキシを設定するためのステップバイステップのガイドはありますか?

参考までに、サイトはデジタルオーシャンでホストされており、SSL 対応です。

はい、READMEに手順が詳しく説明されています。テンプレートを適切な場所に配置するためのwgetコマンドも記載されており、あとはapp.ymlをテンプレートに合わせて更新するだけです。

「いいね!」 2