H
Homarr2mo ago
b_d0n

Reverse proxy issue?

is there a env variable missing for reverse proxy support, on the unraid app x-forwarded-host header with value localip does not match origin header with value homarr.home.com from a forwarded Server Actions request. Aborting the action. does the template support adding a proxy_domain variable? Also to note this is with nginx proxy manager secured with Authentik
Solution:
So you added the following fields?: ``` location / {...
Jump to solution
18 Replies
Cakey Bot
Cakey Bot2mo ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
Meierschlumpf
Meierschlumpf2mo ago
Okay that's intresting, I think nobody else had that problem with a reverse proxy yet, can you maybe share some more details from your setup? Probably related: https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions#allowedorigins
next.config.js: serverActions | Next.js
Configure Server Actions behavior in your Next.js application.
b_d0n
b_d0nOP2mo ago
What else would you like? My nginx config?
Meierschlumpf
Meierschlumpf2mo ago
Yes (I only need the homarr part other services are probably not important)
b_d0n
b_d0nOP2mo ago
Pastebin
Increase buffer size for large headers# This is needed only if yo...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
b_d0n
b_d0nOP2mo ago
this is what my npm advanced tab looks like. this setup has always worked until v1.0 fyi here is the exact log entry
`x-forwarded-host` header with value `192.168.1.50:7575` does not match `origin` header with value `homarr.home.com` from a forwarded Server Actions request. Aborting the action.
⨯ [Error: Invalid Server Actions request.] { digest: '4021323368' }
`x-forwarded-host` header with value `192.168.1.50:7575` does not match `origin` header with value `homarr.home.com` from a forwarded Server Actions request. Aborting the action.
⨯ [Error: Invalid Server Actions request.] { digest: '4021323368' }
Meierschlumpf
Meierschlumpf2mo ago
Thanks, I'll investigate further tomorrow
b_d0n
b_d0nOP2mo ago
Ok
Meierschlumpf
Meierschlumpf2mo ago
I tried to find a solution for something in that direction and I'm not quite sure if there is one. That said, can you investigate the reason why the x-forwarded-host is 192.168.1.50:7575? And with which url are you opening Homarr?
b_d0n
b_d0nOP2mo ago
As far as I can tell the x-forwarded-host shouldn’t be directed toward the servers ip:port it makes 0 sense and really shouldn’t even be working, but it is? And I’m using the correct url to open my homarr, if that is what u mean? I’m not gonna share the url here
Meierschlumpf
Meierschlumpf2mo ago
But are you using the ip with port or a domain?
b_d0n
b_d0nOP2mo ago
Where would I verify this? In my nginx correct? 🤦🏼‍♂️ it’s fixed I had the directives in the wrong spot.. I can’t believe it half worked tho lol 😂
Meierschlumpf
Meierschlumpf2mo ago
Okay xD, so I have to fix nothing 😂
b_d0n
b_d0nOP2mo ago
For anyone that runs into this bone head mistake here is the correct nginx proxy manager advanced field: https://pastebin.com/Ju90HxTa
Pastebin
Increase buffer size for large headers# This is needed only if yo...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
b_d0n
b_d0nOP2mo ago
That’s a good thing tho 😏 also marking as solved and posted the solution above in case anyone makes the same mistake
Solution
Meierschlumpf
Meierschlumpf2mo ago
So you added the following fields?:
location / {
# ...
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# ...
}
location / {
# ...
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# ...
}
b_d0n
b_d0nOP2mo ago
Yes under/ location
Meierschlumpf
Meierschlumpf2mo ago
Okay, makes sense 👍🏽

Did you find this page helpful?