MR
Hi everyone,
I’ve just deployed a Laravel project on App Platform. At first I defined the HTTP routes with “/api”, but then I modified the value and now the HTTP route’s values is “/”. The GET requests are working fine, but I am unable to make POST requests, I am getting 405 - "The GET method is not supported for this route. Supported methods: POST.
In my APP SPECS/services/ the routes are defined like this routes:
When checking the runtime logs I see that there was actually a GET request made
DOCUMENT_ROOT changed to 'public/'
[2022-11-28 19:31:15] Assuming 512MB of RAM
[2022-11-28 19:31:16] PHP memory_limit is 128M Bytes
[2022-11-28 19:31:16] Starting php-fpm with 4 workers...
[2022-11-28 19:31:17] Starting httpd...
[2022-11-28 19:31:18] Application ready for connections on port 8080.
[2022-11-28 19:31:48] 10.244.20.5 - - [28/Nov/2022:19:31:47 +0000] "GET /api/ceva HTTP/1.1" 405 93 "http://cezagora-api-ztafo.ondigitalocean.app/api/ceva" "PostmanRuntime/7.29.2
Any idea how I can fix this?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi there,
Sounds like you are making the POST request to HTTP rather than HTTPS.
Can you try using the HTTPS URL in Postman instead?
Let me know how it goes!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.