Access-Control-Allow-Origin CORS errors due to incorrect owner on Shlink directory #130
-
Shlink version3.6.4 PHP version8.1.10 How do you serve ShlinkSelf-hosted nginx Database engineMySQL Database version5.7.32 SummaryAdd server to https://app.shlink.io, The browser console shows an error curl -X OPTIONS https://www.example.com/rest/v3/health -H "accept: application/json" -H "origin: https://app.shlink.io" -H "Access-Control-Request-Headers: content-type,x-api-key" -I command info: |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 5 replies
-
By the 500 error on the second line, I'm guessing there's some other issue. Try the same cURL but with GET. Also, Shlink generates those headers automatically. You can just let it do it. No need to define them yourself in nginx config. |
Beta Was this translation helpful? Give feedback.
-
Finally, after I saved the nginx, php-fpm, and shlink directories as the nginx user and user group, the startup was successful. Thank you for your reply, have nice day |
Beta Was this translation helpful? Give feedback.
Finally, after I saved the nginx, php-fpm, and shlink directories as the nginx user and user group, the startup was successful. Thank you for your reply, have nice day