[GH-ISSUE #1161] [Not-urgent] "change layout" function broke after 0.23 #759

Closed
opened 2026-03-02 11:52:28 +03:00 by kerem · 3 comments
Owner

Originally created by @maidou-00 on GitHub (Mar 26, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1161

Hello, the "change layout" function does nothing after hoarder 0.23 update, previously it worked fine. The Hoarder containers is in the same docker network with Nginx proxy manager (serves as a reverse proxy).

seemed like I didn't set up nginx correctly? but it worked fine before the update.
Not sure what happened. Any help would be appreciated.

here is the log after clicking "change layout":


`x-forwarded-host` header with value `hoarder.mai-space.net` does not match `origin` header with value `hoarder.mai-space.net:30000` from a forwarded Server Actions request. Aborting the action.
Error: Invalid Server Actions request.
    at rE (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:7189)
    at r7 (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:18:1150)
    at /app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:19:726
    at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
    at Object.wrap (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:13:17831)
    at /app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:19:616
    at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
    at Object.wrap (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:13:16935)
    at ne (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:19:543)
    at nx.render (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:19:4578) {
  digest: '351827129'
}
Originally created by @maidou-00 on GitHub (Mar 26, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1161 Hello, the "change layout" function does nothing after hoarder 0.23 update, previously it worked fine. The Hoarder containers is in the same docker network with Nginx proxy manager (serves as a reverse proxy). seemed like I didn't set up nginx correctly? but it worked fine before the update. Not sure what happened. Any help would be appreciated. here is the log after clicking "change layout": ___ ``` `x-forwarded-host` header with value `hoarder.mai-space.net` does not match `origin` header with value `hoarder.mai-space.net:30000` from a forwarded Server Actions request. Aborting the action. Error: Invalid Server Actions request. at rE (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:7189) at r7 (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:18:1150) at /app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:19:726 at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14) at Object.wrap (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:13:17831) at /app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:19:616 at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14) at Object.wrap (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:13:16935) at ne (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:19:543) at nx.render (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:19:4578) { digest: '351827129' } ```
kerem closed this issue 2026-03-02 11:52:28 +03:00
Author
Owner

@MohamedBassem commented on GitHub (Mar 29, 2025):

It's working for me (I use caddy), so it seems like there might be something wrong with your nginx setup indeed. I upgraded nextjs in the last release, so maybe they added some extra validation or something that wasn't there before. Can you share your nginx config so that we can debug what might be wrong?

<!-- gh-comment-id:2763751212 --> @MohamedBassem commented on GitHub (Mar 29, 2025): It's working for me (I use caddy), so it seems like there might be something wrong with your nginx setup indeed. I upgraded nextjs in the last release, so maybe they added some extra validation or something that wasn't there before. Can you share your nginx config so that we can debug what might be wrong?
Author
Owner

@maidou-00 commented on GitHub (Mar 30, 2025):

It's working for me (I use caddy), so it seems like there might be something wrong with your nginx setup indeed. I upgraded nextjs in the last release, so maybe they added some extra validation or something that wasn't there before. Can you share your nginx config so that we can debug what might be wrong?

Hi Mohamed, thanks for replying. Yea I suspect the problem is on my end too. I know you are very busy with the project so let me see if I can troubleshoot it by myself and I will post my solution if I can crack it :) if not, I will come back and seek help :)

<!-- gh-comment-id:2764368677 --> @maidou-00 commented on GitHub (Mar 30, 2025): > It's working for me (I use caddy), so it seems like there might be something wrong with your nginx setup indeed. I upgraded nextjs in the last release, so maybe they added some extra validation or something that wasn't there before. Can you share your nginx config so that we can debug what might be wrong? Hi Mohamed, thanks for replying. Yea I suspect the problem is on my end too. I know you are very busy with the project so let me see if I can troubleshoot it by myself and I will post my solution if I can crack it :) if not, I will come back and seek help :)
Author
Owner

@maidou-00 commented on GitHub (Mar 30, 2025):

Hey Mohamed @MohamedBassem, I'am happy to report that I am able to fix it. I use Nginx-proxy-manager, here is how I did it:

  1. in the Nginx proxy manager "proxy host list", find the line for Hoarder
  2. click the "three dots" (on the right-hand side of the line for Hoarder), click "edit"
  3. click "Advanced". Paste the following code into the block:
location /
{
proxy_pass http://IP:PORT;  
# Note: this comment section is for explanation purpose only, please remove it when you paste it into Nginx, as it could mess up the codes. Please replace the above "IP:PORT" with your IP address and port number for hoarder. For example, mine is http://hoarder-WEB:3000 (I didn't use port mapping). In your case it could be http://localhost:3000, or http://numbers.numbers.numbers.numbers:port number, depends on how you configure your address for hoarder.  

proxy_set_header Host $http_host;
proxy_redirect http:// https://; 
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Port $server_port; 
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
}

Hope this can help other users who run into similar problems like me! I am wondering if I can make a PR and add it into the docs as other users might have similar issue?

<!-- gh-comment-id:2764410532 --> @maidou-00 commented on GitHub (Mar 30, 2025): Hey Mohamed @MohamedBassem, I'am happy to report that I am able to fix it. I use Nginx-proxy-manager, here is how I did it: 1. in the Nginx proxy manager **"proxy host list"**, find the line for Hoarder 2. click the **"three dots"** (on the right-hand side of the line for Hoarder), click **"edit"** 3. click **"Advanced"**. Paste the following code into the block: ``` location / { proxy_pass http://IP:PORT; # Note: this comment section is for explanation purpose only, please remove it when you paste it into Nginx, as it could mess up the codes. Please replace the above "IP:PORT" with your IP address and port number for hoarder. For example, mine is http://hoarder-WEB:3000 (I didn't use port mapping). In your case it could be http://localhost:3000, or http://numbers.numbers.numbers.numbers:port number, depends on how you configure your address for hoarder. proxy_set_header Host $http_host; proxy_redirect http:// https://; proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_http_version 1.1; } ``` Hope this can help other users who run into similar problems like me! I am wondering if I can make a PR and add it into the docs as other users might have similar issue?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#759
No description provided.