Twitter incompatibility

Saint Michael venefax at gmail.com
Sun May 19 20:47:02 UTC 2024


I need some help with a Nginx,. Twitter problem
please open a twitter client x.com
and post this link
https://patrician.org/22a51cfb-7d5b-4a97-a687-a10cd1946766/
and then open a new client and post
https://xlong.org/p/a3622727-4df1-46f3-aee8-ee0a43194906/

in the first case, it's an Apache server, and X pulls the twitter card just fine
in the second, it fails, it posts the link as is, very ugly, no image
both link works, but only Apache allows twitter to work as intended,
pulling image called "twitter:card"

I tried with both on and off versions of
underscores_in_headers on;
ignore_invalid_headers on;

my configuration is:

http {
client_body_buffer_size 150M;
client_max_body_size 150M;
    include       mime.types;
    default_type  'text/html; charset=UTF-8';

#application/octet-stream;


    types {
        # Common video formats
        video/ogg                   ogv;
        video/x-matroska            mkv;
        application/xml             xml;
}

ssl_buffer_size 4k;
ssl_session_cache shared:SSL:1m; # holds approx 4000 sessions
ssl_session_timeout 1h; # 1 hour during which sessions can be re-used.
ssl_session_tickets off;
#ssl_protocols TLSv1.2 TLSv1.3;
sendfile        on;
tcp_nopush     on;
tcp_nodelay     on;
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript
application/x-javascript application/xml;
gzip_disable "MSIE [1-6]\.";
keepalive_timeout  65;
types_hash_max_size 2048;
proxy_headers_hash_max_size 1024;
proxy_headers_hash_bucket_size 128;
server_tokens off;
log_format custom '"$host" $remote_addr - $remote_user [$time_local] '
                        '"$request" $status $body_bytes_sent '
                        '"$http_referer" "$http_user_agent"';

error_log  /var/log/nginx/error.log error;
access_log /var/log/nginx/access.log custom;
underscores_in_headers on;
ignore_invalid_headers on;


More information about the nginx mailing list