How can I allow more methods for custom domains

Hey guys, I have set up domain and registered everything works well but I have a single problem whereby the access-control-allow-methods doesn’t have the POST method, so all my POST requests are rejected since they are not allowed. It will be great if someone can help add the POST method to my custom domain.
For more information, I am posting the part of the registration status for my canister

Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200
< server: nginx/1.21.3
< date: Thu, 30 Mar 2023 18:34:22 GMT
< content-length: 97
< access-control-allow-origin: *
< access-control-allow-methods: HEAD, GET, PUT, DELETE
< access-control-allow-credentials: true
< access-control-allow-headers: DNT,User-Agent,X-Requested-With,If-None-Match,If-Modified-Since,Cache-Control,Content-Type,Range,Cookie
< access-control-expose-headers: Accept-Ranges,Content-Length,Content-Range
< access-control-max-age: 600
<

It will be great if anyone can point me to the right directions, Thanks

Hi!

Based on the Access-Control-Allow-Methods header you are seeing, it seems that you are referring to the /registrations/<id> endpoint, which really does not accept a POST request. The operations supported on that endpoint are:

  1. GET /registrations/<id> - Retrieve information about an existing registration, including it’s name, canister ID and status.
  2. PUT /registrations/<id> - Allows one to trigger an update to the canister ID associated with their custom domain, assuming certain prerequisites are met (the appropriate DNS record has been updated).
  3. DELETE /registrations/<id> - Allows one to trigger a removal of their custom domain from the IC altogether, assuming certain prerequisites are met (all relevant DNS records are removed, etc).

As for a POST request, that would indeed be allowed on the /registrations endpoint, to create a registration for a new custom domain.

Are you referring to making a POST request on your actual canister? Happy to try to assist, just let me know if you have any clarifications.

Thanks for answering back, I am talking POST request on the actual canister by using the custom domain that I registered. I tried to do curl -sLv for my canister domain, the Access-Control-Allow-Methods also has a missing POST request.

Hi @itsyaasir, would you mind providing the curl that you’re using?