-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] Add setting to change User Agent of OEmbed calls #6753
Conversation
In doing so, If we want to share a single page application, we can include requests from `rocketchatbot` in our server rules to redirect to something like prerender.io version of the page or our own pre-rendering server. Example prerender.io config: ``` <IfModule mod_proxy_http.c> RewriteCond %{HTTP_USER_AGENT} rocketchatbot|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator [NC,OR] RewriteCond %{QUERY_STRING} _escaped_fragment_ # Only proxy the request to Prerender if it's a request for HTML RewriteRule ^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent|\.ttf|\.woff))(.*) http://service.prerender.io/http://example.com/$2 [P,L] </IfModule> ```
@engelgabriel @rodrigok - I dont see the benefit of turning this into a setting. We could always append
|
IMO, a setting is always better. |
Agreed. I think would be best to leave the server admin in control of that instead of forcing rocketchatbot on it. Could effect the results some websites return, and in general cause issues with oembed functionality. @AhmetS would you be able to make this change to a setting? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
In doing so, If we want to share a single page application, we can include requests from
rocketchatbot
in our server rules to redirect to something like prerender.io version of the page or our own pre-rendering server.Example prerender.io config:
@RocketChat/core
Closes #ISSUE_NUMBER