# Invalid Origin Error

**URL:** <https://help.nextcloud.com/t/invalid-origin-error/117081>\
**Category:** ℹ️ Support\
**Tags:** ncp\
**Created:** [May 25, 2021, 10:10am UTC](https://help.nextcloud.com/t/invalid-origin-error/117081 "2021-05-25T10:10:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drexxi](https://help.nextcloud.com/user_avatar/help.nextcloud.com/drexxi/32/38471_2.png) [@drexxi](https://help.nextcloud.com/u/drexxi)\
**Post date:** [May 25, 2021, 10:10am UTC](https://help.nextcloud.com/t/invalid-origin-error/117081/1 "2021-05-25T10:10:51Z")

</div>

Hello,

i’m Running a NextCloudPi Server on Docker.  
NCP is hosted on my Synology.  
Its running behing the On-Board NGINX Reverse Proxy.

I have to Problems.

First Problem:

NCP trys to Redirect in URL Links on Port 443 and 4443, but i need to mask these Ports with some other Ports in the Local Area Network.

First Question:

How to make these Redirects working on my masked Ports?

Second Problem:

NCP dont make Updates because of an “Invalid Origin” Error.

The trusted domains are working, the reverse Proxy is working and i have access from the internet.

Second Question:

How to get rid of this “Invalid Origin” Error?

Greetings

---

<div class="post-metadata">

**Author:** ![eyduh](https://help.nextcloud.com/user_avatar/help.nextcloud.com/eyduh/32/30520_2.png) [@eyduh](https://help.nextcloud.com/u/eyduh)\
**Post date:** [May 26, 2021, 9:06am UTC](https://help.nextcloud.com/t/invalid-origin-error/117081/2 "2021-05-26T09:06:16Z")

</div>

Hi,

How did you run up the docker instance?  
Docker run or compose?  
What were your settings?

A good thing about docker is that you can host ports to whatever you want as the internal docker ports are still the same.  
In docker run it’s the -p flag, so [host]:443 -p [host2]:4443 or in docker compose  
ports  
- host:443

Then with an nginx reverse proxy all you have to do is point it to the right ports. However, there are a bunch of nginx flags/settings to make something like nextcloud work properly. What’s your nginx configuration?

I suspect it’s got something to do with this setting  
`X-Frame-Options: SAMEORIGIN` but I’m not expert so

I suspect this is where the issue lies but it might be some other Synology related thing.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 13, 2024, 9:44am UTC](https://help.nextcloud.com/t/invalid-origin-error/117081/3 "2024-12-13T09:44:16Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 13, 2024, 9:44am UTC](https://help.nextcloud.com/t/invalid-origin-error/117081/4 "2024-12-13T09:44:17Z")

</div>


