juliusknorr / nextcloud-docker-dev

Nextcloud development environment using docker-compose
GNU Affero General Public License v3.0
139 stars 74 forks source link

405 (Method Not Allowed) #354

Closed yuriry closed 4 days ago

yuriry commented 4 days ago

My app has a resource defined in routers.php. GET, POST and DELETE work, but PUT returns 405 (Method Not Allowed).

I suspect it is because of content-security-policy header returned in the response.

For working requests it is

default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'

For failing requests it is

default-src 'self'; script-src 'self' 'nonce-LONG-BASE64-ENCODED'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';

I'm not sure where it is coming from, probably from nginx, not from the PHP or app. I tried to search nginx logs in master-proxy-1 container, but couldn't find anything.

Any help on how to debug this would be greatly appreciated.

juliusknorr commented 4 days ago

The nginx container should at least show the request as the logs print out the access log: docker compose logs -f proxy

Other than that this is most likely an issue unrelated to the dev environment so the best might be to ask in https://help.nextcloud.com/c/dev/11 for help, ideally with a link to the code you have in place and how you send the request - that might be the fastest way to get some assistance ;)

Closing here are out of scope of issue tracking for nextcloud-docker-dev.