Alex.B: Symfony 5 Routing mit Defaults

Beitrag lesen

Hallo pl,

ja passt nicht, aber selbst mit einem passenden Default geht es nicht. Die Route wird nicht gefunden.

Oder muss der ngnix dahingehend abgepasst werden?

#nginx config
server {
    listen 80;
    server_tokens off;

    root /var/www/html/public;
    index index.php;

    charset utf-8;

    error_log  /var/log/nginx/error.log;
    access_log /var/log/nginx/access.log;

    location / {
            try_files $uri $uri/ /index.php?$args;
            include fastcgi_params;

            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_pass php-timetrackerservice:9000;
            fastcgi_index index.php;
            fastcgi_cache off;
            fastcgi_hide_header X-Powered-By;

            # basics
            add_header Accept "application/json" always;
            add_header Accept-Charset "utf-8" always;

            # security
            add_header X-XSS-Protection "1; mode=block" always;
            add_header X-Frame-Options "SAMEORIGIN" always;
            add_header X-Content-Type-Options "nosniff" always;
            add_header Strict-Transport-Security "max-age=31536000" always;
            add_header Content-Security-Policy "default-src 'self';" always;
            add_header Referrer-Policy "no-referrer" always;
            add_header X-Permitted-Cross-Domain-Policies "none" always;
            add_header Feature-Policy "none" always;
    }
}