ReplyGif: Adding reaction GIF easily

You need to follow the proxy instructions.
https://github.com/cpradio/discourse-plugin-replygif

There is a section on the README regarding HTTPS.

TL;DR proxy configuration there, but doesn’t solve problem, as non-proxy links still fetched.

Details:

I inspected the server, and it is configured as per your instructions. I went into the container itself to inspect the discourse.conf and found that the proxy pass was appropriately setup.

Using Chromium developer tools (Network), I do see queries going through the proxy, e.g. https://mycompany.com/replygif/gifs?api-key=39YAprx5Yi&reply=Angry. It returns a JSON, with URLs like http://replygif.net/i/1032.gif.

Afterward, network connection from my client brower, will request thumbnails, such as http://replygif.net/thumbnail/176.gif. This then obviously will fail, because CSP will block mixed content (http + https).

I do not know how the ember.js application works, but deducing from the network traffic, it looks like there are queries to get a JSON back with Image URLs which are later fetched for the thumbnails, but those image links themselves won’t work, and proxypass won’t fix this.

To solve this, it looks like the ember app itself would have to be configured to rewrite these URL references to match the same referenced URL through the proxy, e.g. https://mycompany.com/replygif/thumbnail/176.gif.

Thoughts? Suggestions?

1 Like

Doesn’t seem there is much I can do about that. As it looks like replygif still does not support HTTPS.

2 Likes

I’m a noob at this stuff, is there a step-by-step guide to set up a reverse proxy for this plugin?

Secure site, hosted with digitalocean, if that helps.

Yes, the readme walks you through the steps. Even has the wget command to put the template in the right location, then its a matter of updating your app.yml to use the template.

2 Likes

@cpradio Hey buddy - thanks for all your work with the animated gif plugin. Things seem to be operational, but I get the following error when I’m trying to use the tag search.

Uncaught TypeError: c.template is not a function
at _application-84dd57853abdabbc6192544517edf1800652f49b885ebcbbca8df6a1ca441625.js:15256
at j (_application-84dd57853abdabbc6192544517edf1800652f49b885ebcbbca8df6a1ca441625.js:15371)
at HTMLInputElement.<anonymous> (_application-84dd57853abdabbc6192544517edf1800652f49b885ebcbbca8df6a1ca441625.js:15431)
at HTMLInputElement.dispatch (_ember_jquery-8ef4e572f0bf9485e6ef9a35f088729735f82434cf495fbcd5acedefbcddb363.js:5251)
at HTMLInputElement.v.handle (_ember_jquery-8ef4e572f0bf9485e6ef9a35f088729735f82434cf495fbcd5acedefbcddb363.js:5058) 

Do you have some ideas to help troubleshoot? Hope you’re staying safe right now!

1 Like

This is now fixed, update via the admin tool and it will work.

1 Like

As per instruction this is setup for you.

Details: The discourse container has nginx running inside of it and configured. Nginx is the web server has capability to do reverse proxy. The instructions document using a template ( templates/web.replygif.template.yml), which carries the reverse proxy snippet that discourse’s automation will use to reconfigure nginx settings. Once you rebuild the server, the automation will be applied and you get the reverse proxy.

I finally figured out what to do with:

wget https://raw.githubusercontent.com/cpradio/discourse-plugin-replygif/master/web.replygif.template.yml -O /var/discourse/templates/web.replygif.template.yml

that was my hangup.

Thanks for the help @Joaquin_Menchacha & @cpradio

2 Likes

Hello I’m using giphy in my forum, but i just have a little issue, the icon doesn’t appear in the window.

giphy icon

1 Like

If you are using Giphy, then this isn’t the right topic. This is for ReplyGif. Seems whoever forked it for giphy hasn’t updated it in a few years and the font-awesome reference they have is no longer supported.

3 Likes

Oh i’m sorry, thank you. :slight_smile:

1 Like

@PaulinaMX, I have updated the giphy plugin to fix it. You will need to update your app.yml to point to the new repository location until the owner takes my changes.

https://github.com/cpradio/discourse-giphy

6 Likes

Thanks, i’m going to try this.

1 Like

@cpradio Thank you :heart: It’s working now.

4 Likes

I just set this up, but I only see “Loading… Loading…” in the modal. I thought I had done something wrong with setting up the reverse proxy, but I wen’t to replygif.net and it looks like the api isn’t working their either.

Just wanted to do a sanity check it see if it was just me or if replygif.net is down?

3 Likes

Not the same thing, but there is a theme component in the same area using Giphy that may be useful for you: Discourse Gifs component

2 Likes

oh, I had installed the giphy plugin, but the theme component is even better. I didn’t know that was a thing, thanks!

2 Likes

Is it always working with last version of Discourse ?

If yes i will test it. i can translate it to french too if needed.

1 Like

Maybe I don’t understand this, maybe see Notice: testing Discourse Reactions here on meta for 1 week! - #9 by awesomerobot

1 Like