0

I am trying to deploy kartoza/docker-geoserver. Everything seems to work but after logging in and trying to create a workspace I get a 400 Bad Request when I hit save and the POST call is made. I assume this is related to the config lock. Is there a ENV variable to set this to disabled when it is deployed?

6
  • I doubt it is a "config lock" - what does the log file say is actually the problem.
    – Ian Turton
    Commented Apr 25 at 16:03
  • This is deployed on Google Cloud Run and I am trying to use PostgreSQL as the backend for the config files(jdbcconfig). I don't see anything in the log section of the web ui and when i try to download the full log file i get the 400 error. Google cloud run logs show this. POST4001.82 KB20 msChrome 122 geoserver-uc.a.run.app/geoserver/web/wicket/bookmarkable/…
    – Jay Hill
    Commented Apr 25 at 18:54
  • Is the request even getting to GeoServer? or is this a Google Cloud issue? Please add the exact request you are posting and the URL and the full response that is returned.
    – Ian Turton
    Commented Apr 26 at 8:18
  • It is. This is the log from the cloud run event. { httpRequest: {11} insertId: "662f97390008228adc4a61a5" labels: {1} logName: "projects/geoserver-dev/logs/run.googleapis.com%2Frequests" receiveTimestamp: "2024-04-29T12:48:57.639151462Z" resource: {2} severity: "WARNING" spanId: "349559552646440709" timestamp: "2024-04-29T12:48:57.462635Z" trace: "projects/geoserver-dev/traces/d4cf68872328519f4f4d0501a35ad637" }
    – Jay Hill
    Commented Apr 29 at 12:51
  • I am trying to save a workspace when I get the 400 error. HTTP Status 400 – Bad Request Type Status Report Message Origin does not correspond to request Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Apache Tomcat/9.0.73
    – Jay Hill
    Commented Apr 29 at 12:59

1 Answer 1

0

You need to whitelist your site in the CSRF protection filter - see the manual

5
  • This env var isn't used in the docker container though correct?
    – Jay Hill
    Commented May 6 at 21:53
  • I don't know what the docker container does - but to get that error message you have a CSRF problem
    – Ian Turton
    Commented May 7 at 8:37
  • Setting GEOSERVER_WHITELIST_DISABLED to true makes everything work but when I try to add a domain to the whitelist I am still unable to save any configuration settings.
    – Jay Hill
    Commented May 7 at 12:39
  • do you get the same error or a different one? Have you dealt with CORS?
    – Ian Turton
    Commented May 7 at 12:45
  • Ian, not sure why but I thought CORS was enabled by default. That with the domain in the whitelist fixed it all. Appreciate your help!
    – Jay Hill
    Commented May 8 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.