Commit Graph

29 Commits (main)

Author SHA1 Message Date
Dessalines 9a2fb8e7c2
Fix image_mode for docker lemmy.hjson (#4403) 4 months ago
Nutomic e8a52d3a5c
Rewrite images to use local proxy (#4035)
* Add markdown rule to add rel=nofollow for all links

* Add markdown image rule to add local image proxy (fixes #1036)

* comments

* rewrite markdown image links working

* add comment

* perform markdown image processing in api/apub receivers

* clippy

* add db table to validate proxied links

* rewrite link fields for avatar, banner etc

* sql fmt

* proxy links received over federation

* add config option

* undo post.url rewriting, move http route definition

* add tests

* proxy images through pictrs

* testing

* cleanup request.rs file

* more cleanup (fixes #2611)

* include url content type when sending post over apub (fixes #2611)

* store post url content type in db

* should be media_type

* get rid of cache_remote_thumbnails setting, instead automatically
take thumbnail from federation data if available.

* fix tests

* add setting disable_external_link_previews

* federate post url as image depending on mime type

* change setting again

* machete

* invert

* support custom emoji

* clippy

* update defaults

* add image proxy test, fix test

* fix test

* clippy

* revert accidental changes

* address review

* clippy

* Markdown link rule-dess (#4356)

* Extracting opengraph_data to its own type.

* A few additions for markdown-link-rule.

---------

Co-authored-by: Nutomic <me@nutomic.com>

* fix setting

* use enum for image proxy setting

* fix test configs

* add config backwards compat

* clippy

* machete

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
4 months ago
Dessalines 907e0ce726
Removing one other cache_remote_images. (#4151) 6 months ago
Nick Webster a57658d99c
Adding a new config flag to disable pictrs caching for thumbnails (#3897)
* add logic to prevent downloading remote pictrs images

* apply formatting

* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance

* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance and cache_federated_images is false

* Generalising the no caching option to handle all remote images

* rustfmt

* Return None if the URL is not an image

* Updating defaults.hjson

* fixing typo

* Fixing typo

* Skip cloning the Url unless we need to

* using a HEAD request for checking the content type, saving bandwidth/improving perf

* Removing early returns

* Switching back to GET requests for Content-Type because pictrs does not handle HEAD requests

* Simplifying logic and using metadata_image instead of url if we do not get a pictrs thumbnail

* Removing unused import

* Return None as a thumbnail if caching is disabled

* formatting

---------

Co-authored-by: Djones4822 <david.jones4822@gmail.com>
9 months ago
Dessalines 993489a80f
Combine prod and dev docker setups using build-arg (#2739)
* Combine prod and dev docker setups using build-arg

- Fixes #2603

* Dont use cache for release build.
1 year ago
sam365724 cb559178bd
More real-world prod config, separate lemmy config (#2487) 2 years ago
Dessalines 4e12e25c59
Adding admin purging of DB items and pictures. #904 #1331 (#1809)
* First pass at adding admin purge. #904 #1331

* Breaking out purge into 4 tables for the 4 purgeable types.

* Using CommunitySafe instead in view

* Fix db_schema features flags.

* Attempting to pass API key.

* Adding pictrs image purging

- Added pictrs_config block, for API_KEY
- Clear out image columns after purging

* Remove the remove_images field from a few of the purge API calls.

* Fix some suggestions by @nutomic.

* Add separate pictrs reqwest client.

* Update defaults.hjson

Co-authored-by: Nutomic <me@nutomic.com>
2 years ago
Dessalines 2985e88a49
Fixing generate unique changeme (#2205)
* Fixing generate unique changeme

* Fixing generate unique changeme 2

* Changing link to .invalid domain.

Co-authored-by: Nutomic <me@nutomic.com>
2 years ago
Riley 3032a2745b
Opentelemetry (#1992)
* Add otlp export

* Add jaeger to dev docker

* More instrument

* Update deps

* Merge from main.

* Add comment about viewing traces

* Fixing reqwest-tracing dep.

* Update pre-commit regex

* Move imports to top

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2 years ago
Dessalines b18ea3e0cc
Renaming to slur_filter. Fixes #1773 (#1801)
* Renaming to slur_filter. Fixes #1773

* Fixing config

* Updating doku for slur filter.

* Updating doku for slur filter again.

* Remove comment.
3 years ago
Felix Ableitner cf214ff583 Move jwt secret from config to database (fixes #1728) 3 years ago
Dessalines 0fbc342fe3 Fix tests 3 years ago
Dessalines 6af75492a9
Swap out iframely (#1706)
* Replace Iframely. Fixes #1681

* Add post_link_tags to nginx

* Adding post_link_tags route

* Cleaning up post_link_tags

* Changing PostLink to SiteMetadata, adding it to the API.

* Fixing issue when local has no openssl certs.

* Fixing an issue with pictrs errors

* Revert "Fixing issue when local has no openssl certs."

This reverts commit dbf7d1b1ee03846e5ef7b7156e618424f1150e1d.

* Add ca-certs to dockerfile for volume mount.

* Cleaning up fetch_pictrs request

* Changing to fetch_site_data
3 years ago
Dessalines 12d50e42b4
Change join.lemmy.ml to join-lemmy.org (#1628) 3 years ago
Dessalines 462c4a2954
Rewrite settings implementation. Fixes #1270 (#1433)
* A first attempt at using deser-hjson. Fixes #1270

* Trying to fix tests, try 1

* Trying to fix tests, try 2

* A few fixes to deser_hjson

- Removing unwrap_or_defaults, using impl functions.
- Reorganized settings

* Make clippy happy

* hjson list strings must be quoted.

* Adding support for env vars.

* Moving to structs and defaults file.

* Moving settings default and struct.
3 years ago
Dessalines d5d99fa3b9
Moving docs to join.lemmy.ml . Fixes #1396 (#1410)
* Moving docs to join.lemmy.ml . Fixes #1396

* Removing submodule fetch from drone.
3 years ago
Dessalines 01a14e3b3c
Change references of dev.lemmy.ml to lemmy.ml (#1281)
* Change references of dev.lemmy.ml to lemmy.ml

* Remove the dev.lemmy.ml refs in RELEASES.md
4 years ago
Dessalines 295c209c67 Updating lemmy.hjson config. 4 years ago
Dessalines 5c6258390c
Isomorphic docker (#1124)
* Adding a way to GetComments for a community given its name only.

* Adding getcomments to api docs.

* A first pass at locally working isomorphic integration.

* Testing out cargo-husky.

* Testing a fail hook.

* Revert "Testing a fail hook."

This reverts commit 0941cf1736.

* Moving server to top level, now that UI is gone.

* Running cargo fmt using old way.

* Adding nginx, fixing up docker-compose files, fixing docs.

* Trying to re-add API tests.

* Fixing prod dockerfile.

* Redoing nightly fmt

* Trying to fix private message api test.

* Adding CommunityJoin, PostJoin instead of joins from GetComments, etc.

- Fixes #1122

* Fixing fmt.

* Fixing up docs.

* Removing translations.

* Adding apps / clients to readme.

* Fixing main image.

* Using new lemmy-isomorphic-ui with better javascript disabled.

* Try to fix image uploads in federation test

* Revert "Try to fix image uploads in federation test"

This reverts commit a2ddf2a90b.

* Fix post url federation

* Adding some more tests, some still broken.

* Don't need gitattributes anymore.

* Update local federation test setup

* Fixing tests.

* Fixing travis build.

* Fixing travis build, again.

* Changing lemmy-isomorphic-ui to lemmy-ui

* Error in travis build again.

Co-authored-by: Felix Ableitner <me@nutomic.com>
4 years ago
nutomic c34fffc2c4 Proxy pictrs requests through Lemmy (fixes #371) (#77)
fix check_only value for image rate limit

Fix image rate limit

Add rate limit for image uploads

Proxy pictrs requests through Lemmy (fixes #371)

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/77
4 years ago
Felix Ableitner 0c89de8065 Fix previous comment, also fix link in docs 4 years ago
Felix Ableitner a9d98fd09b Improve config files by adding documentation and removing some fields 4 years ago
Dessalines 80653a5317
Remove federation option from master. (#745) 4 years ago
Dessalines e54eac6227 Adding use_tls to lemmy.hjson for email config. 4 years ago
Felix 76bf71162e Automatic instance setup based on config variables (fixes #404) 4 years ago
nutomic bf1db428f6 Move volumes into subfolder (ref #474) (#23)
Change ports and container names

Move volumes into subfolder (ref #474)

Merge pull request #587 from StaticallyTypedRice/patch-2

Clarify that content violating this code of conduct will likely be removed.
Clarify that content violating this code of conduct will likely be removed.

Lemmy has a general policy of removing any content that violates the rules whenever possible, which is typically a good thing, and I felt it important to mention that in the code of conduct.

Co-authored-by: Felix <me@nutomic.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Richie Zhang <12566991+StaticallyTypedRice@users.noreply.github.com>
4 years ago
Dessalines 1369ad1fbc Fixing rate limit checking to only ping after a success. Fixes #516 4 years ago
Dessalines 8604c1d257 Fixing error when email already exists. Fixes #427 4 years ago
Dessalines 786be3fa66 Config fixes.
- Adding front_end_dir to settings.
- Adding unit test for PasswordResetRequest encryption.
- Readme points to lemmy.hjson
- Fixing docker prod, dev, and ansible builds.
- Removing redundant env files, as all config is now in a single file.
- Some formatting fixes.
4 years ago