mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
a074564458
* Asyncify more * I guess these changed * Clean PR a bit * Convert more away from failure error * config changes for testing federation * It was DNS So actix-web's client relies on TRust DNS Resolver to figure out where to send data, but TRust DNS Resolver seems to not play nice with docker, which expressed itself as not resolving the name to an IP address _the first time_ when making a request. The fix was literally to make the request again (which I limited to 3 times total, and not exceeding the request timeout in total) * Only retry for connecterror Since TRust DNS Resolver was causing ConnectError::Timeout, this change limits the retry to only this error, returning immediately for any other error * Use http sig norm 0.4.0-alpha for actix-web 3.0 support * Blocking function, retry http requests * cargo +nightly fmt * Only create one pictrs dir * Don't yarn build * cargo +nightly fmt
126 lines
3.6 KiB
Nginx Configuration File
Vendored
126 lines
3.6 KiB
Nginx Configuration File
Vendored
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
server {
|
|
listen 8540;
|
|
server_name 127.0.0.1;
|
|
access_log off;
|
|
|
|
# Upload limit for pictshare
|
|
client_max_body_size 50M;
|
|
|
|
location / {
|
|
proxy_pass http://lemmy-alpha:8540;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# WebSocket support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
# pict-rs images
|
|
location /pictrs {
|
|
location /pictrs/image {
|
|
proxy_pass http://pictrs:8080/image;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
# Block the import
|
|
return 403;
|
|
}
|
|
|
|
location /iframely/ {
|
|
proxy_pass http://iframely:80/;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 8550;
|
|
server_name 127.0.0.1;
|
|
access_log off;
|
|
|
|
# Upload limit for pictshare
|
|
client_max_body_size 50M;
|
|
|
|
location / {
|
|
proxy_pass http://lemmy-beta:8550;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# WebSocket support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
# pict-rs images
|
|
location /pictrs {
|
|
location /pictrs/image {
|
|
proxy_pass http://pictrs:8080/image;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
# Block the import
|
|
return 403;
|
|
}
|
|
|
|
location /iframely/ {
|
|
proxy_pass http://iframely:80/;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 8560;
|
|
server_name 127.0.0.1;
|
|
access_log off;
|
|
|
|
# Upload limit for pictshare
|
|
client_max_body_size 50M;
|
|
|
|
location / {
|
|
proxy_pass http://lemmy-gamma:8560;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# WebSocket support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
# pict-rs images
|
|
location /pictrs {
|
|
location /pictrs/image {
|
|
proxy_pass http://pictrs:8080/image;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
# Block the import
|
|
return 403;
|
|
}
|
|
|
|
location /iframely/ {
|
|
proxy_pass http://iframely:80/;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|
|
}
|