You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior DELETE requests work the same way as GET and PUT
Notes
I suspect it's a Cloudflare issue, but I didn't find a quick solution. Anyway, it's built via Nitro preset and related to Nuxt ecosystem at all. I truly appreciate it if you can help solve the issue.
The text was updated successfully, but these errors were encountered:
serhii-chernenko
changed the title
DELETE requests return 500 Internal server error
DELETE requests from Nuxt API endpoints return 500 Internal server error
Jan 27, 2025
My bad, perhaps it's my gap in knowledge, but I didn't find any related info in Nuxt docs that it's not allowed this way. Anyway, I'm going to close the issue.
Describe the bug
I prepared a new repo for the previous issue: #439:
https://github.com/serhii-chernenko/nuxthub-issue
It's just a simple items list. It uses NuxtHub KV storage (but I guess it doesn't matter for the current issue).
I have 3 types of API endpoints:
GET
— to fetch all items from the storagePUT
— to push a new item to the storageDELETE
— to delete an item from the storage.The first two work as expected.
![Image](https://private-user-images.githubusercontent.com/28815318/407062585-11b75018-4300-4164-b96a-45e6f206e1e9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMjAxNDUsIm5iZiI6MTczOTExOTg0NSwicGF0aCI6Ii8yODgxNTMxOC80MDcwNjI1ODUtMTFiNzUwMTgtNDMwMC00MTY0LWI5NmEtNDVlNmYyMDZlMWU5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDE2NTA0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYxNjllNDliOTUzY2ViMDNhYTVhZTQ2NTJlY2YyMmUzODJjNDBhNDY2ZTIzOTk2Mjg4NmEyOWFmNDUxOTZmNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Y2yMj3C-VlZjq6DACyX_8c2TjNOYcWqxcyk_hd2MqqI)
![Image](https://private-user-images.githubusercontent.com/28815318/407062607-37b5da73-1d5d-4fb0-9cd0-2ed83f3d1406.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMjAxNDUsIm5iZiI6MTczOTExOTg0NSwicGF0aCI6Ii8yODgxNTMxOC80MDcwNjI2MDctMzdiNWRhNzMtMWQ1ZC00ZmIwLTljZDAtMmVkODNmM2QxNDA2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDE2NTA0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ1ODU3ZjcyN2U1YTQ2N2FhN2NlNTYxZTUxZDU0NjY1ZDYyNmYxMmRhYTA0NTI3ZmVmNDNiZDNmOTRhZmFkNDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Qg7_vMH4LW78-oKUEajw8ZRVDDm0dTnjFf5l1TpUEr8)
![Image](https://private-user-images.githubusercontent.com/28815318/407062633-2aa9ff4a-6208-418b-9a4c-f296a5cae2b2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMjAxNDUsIm5iZiI6MTczOTExOTg0NSwicGF0aCI6Ii8yODgxNTMxOC80MDcwNjI2MzMtMmFhOWZmNGEtNjIwOC00MThiLTlhNGMtZjI5NmE1Y2FlMmIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDE2NTA0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiZmUyM2JmNGYwN2FhNDZiNjc5MDY3ZWZlZTg4ZmYyYzU4MjNiOGU3YzZjZTNmZWUyYmZlMGFhMjk5OWYyYzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.AyNTWf4sKsZFrO-NVU77sW9pUUtlo_sdKMKfUl1SaJ0)
DELETE
works correctly locally even withremote: true
option. But on the production URL it just returns this error:I tried to add a trick in the index.delete.ts endpoint file, but it didn't help:
Steps to reproduce
It could be reproduced in the production domain:
https://nuxthub-issue.pages.dev/
Steps to reproduce the behavior:
Expected behavior
DELETE
requests work the same way as GET and PUTNotes
I suspect it's a Cloudflare issue, but I didn't find a quick solution. Anyway, it's built via Nitro preset and related to Nuxt ecosystem at all. I truly appreciate it if you can help solve the issue.
The text was updated successfully, but these errors were encountered: