# Cors problem

**URL:** <https://community.openhab.org/t/cors-problem/113063>\
**Category:** Installation\
**Created:** [January 5, 2021, 4:37pm UTC](https://community.openhab.org/t/cors-problem/113063 "2021-01-05T16:37:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fab4guy](https://community.openhab.org/letter_avatar_proxy/v4/letter/f/b5a626/32.png) [@Fab4guy](https://community.openhab.org/u/Fab4guy)\
**Post date:** [January 5, 2021, 4:37pm UTC](https://community.openhab.org/t/cors-problem/113063/1 "2021-01-05T16:37:55Z")

</div>

I installed openhab3 on my PI 4 today. Before that I had the last 2.5 version running successfully.

Now when addressing the rest endpoints via my Angular application I get the “Cors problem” again.  
I had that back then with the 2.5 openHab version.

However, it could be fixed there by simply adding the following line to runtime.cfg.

`org.eclipse.smarthome.cors:enable=true`

With openhab3 I just tried that too. Unfortunately without success. Is there already a solution to address the rest endpoints from another domain?

` Access to resource at 'http://192.XXX.XXX.XXX:8080/rest/events?topics=smarthome/items' from origin 'http://localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.`

No idea if the question fits here. But anyway thanks for the help. 🙂

---

<div class="post-metadata">

**Author:** ![Fab4guy](https://community.openhab.org/letter_avatar_proxy/v4/letter/f/b5a626/32.png) [@Fab4guy](https://community.openhab.org/u/Fab4guy)\
**Post date:** [January 5, 2021, 11:21pm UTC](https://community.openhab.org/t/cors-problem/113063/2 "2021-01-05T23:21:14Z")

</div>

Okay i found the answer.

Just copy this` org.openhab.cors:enable=true`  
in the runtime.cfg file.

---

<div class="post-metadata">

**Author:** ![anon56373025](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/9de0a6/32.png) [@anon56373025](https://community.openhab.org/u/anon56373025)\
**Post date:** [January 29, 2024, 9:32pm UTC](https://community.openhab.org/t/cors-problem/113063/3 "2024-01-29T21:32:46Z")

</div>

> [@Fab4guy](#):
>
> org.openhab.cors:enable=true

I added it, but get on my webapp the error, that the connection is refused
