CORS issue after server migration #1169
-
How Shlink is set-up
SummaryMy self hosted shlink web can´t connect to my self shlink server - I justed moved the service from one server so another und updated to the latest version. It seems to be a CORS issue, but CORS is enabled at the server: Access to XMLHttpRequest at 'https://lifr.at/rest/v2/health' from origin 'https://app.lifr.at' has been blocked by CORS policy: Request header field x-api-key is not allowed by Access-Control-Allow-Headers in preflight response I don´t know what´s wrong as it worked on the other server with nginx, same distro und php version. My nginx conf: `server {
} |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
It's hard to tell. I have never tried serving via http2. Not sure if it's somewhat related. Also, Shlink will add all the CORS headers automatically. Maybe try removing them from nginx config? |
Beta Was this translation helpful? Give feedback.
-
I´ve disabled http2 and removed cors header, but doesn´t seem to be related. Worked before with http2. It seems that also the server doesn´t redirect anymore. I´ve tested a few known redirects but nothing happens. Very strange. |
Beta Was this translation helpful? Give feedback.
-
OK, it works with php8.0 instead of php7.4. |
Beta Was this translation helpful? Give feedback.
-
I didn't notice that. Yeah, Shlink 2.8 no longer supports PHP 7.4 |
Beta Was this translation helpful? Give feedback.
OK, it works with php8.0 instead of php7.4.