Only respose to post , get method

please shoe me how i can handel request post , get , i use this code but not work

# Restrict allowed methods to GET and POST only
@allowed_methods {
    method GET POST
}

handle @allowed_methods {
    # Serve PHP through FastCGI (application) container
    php_fastcgi app:9000 {
        root /workspace/public
    }
    # Serve static files for other requests
    file_server
}

# Catch-all for unsupported methods
handle {
    respond "Method not allowed" 405
}

Howdy @vahidalvandi, please fill out a Help topic template.

When you say it doesn’t work, there’s a million possible things that could be the cause, and without all of the detailed information we ask for in the template, it’s unlikely any of the volunteers on this forum will be able to give you any kind of accurate assistance.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.