Editing the Rest API CORS Policy  [SOLVED]

General discussions around KeyHelp.
Post Reply
crumblepaper
Posts: 3
Joined: Thu 28. Jul 2022, 19:36

Editing the Rest API CORS Policy

Post by crumblepaper »

Hi everyone,

I would like some help understanding where to make changes to the CORS policy so that another domain can fetch the resources.
The origin is https://platform.appgyver.com.

I have changed the policy in the apache2.conf, and the keyhelp.conf and it works for other headers, but it will not allow the origin any success. I wanted to change the policy in the .htaccess of the server, but it seems that the change does not take effect.

Is there a file I am not going into, or should I be reading on something else to get the origin accepted.
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Editing the Rest API CORS Policy

Post by Alexander »

Hello,

From which domain do you want to access the resources of https://platform.appgyver.com?

If it is the domain of one of your client accounts, you need to go to:

KeyHelp admin panel -> "Domains" -> Select the domain you want to set the CORS directives -> Go to the "Apache Settings" tab -> Enter your CORS policies here.

Alternatively, create an .htaccess file in the directory the domain points to.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
crumblepaper
Posts: 3
Joined: Thu 28. Jul 2022, 19:36

Re: Editing the Rest API CORS Policy  [SOLVED]

Post by crumblepaper »

Hi Alexander,

Thanks for your response. After searching for answers, I started reading and understanding the CORS. My issue was not with KeyHelp.

The live preview version from Appgyver has many sources, and it was even recommended in the Appgyver documentation to build a version and test with the built version on the server (Getting rid of the need for policy settings)
crumblepaper
Posts: 3
Joined: Thu 28. Jul 2022, 19:36

Re: Editing the Rest API CORS Policy

Post by crumblepaper »

I'm wondering how can I edit the KeyHelp REST APIs CORS Policy. I've made http(s) directive updates on the root domain for the panel and the API is having preflight errors.
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Editing the Rest API CORS Policy

Post by Alexander »

Without a detailed explanation of what changes you have made and what exactly you are trying to accomplish (sample code, etc.), this cannot be answered.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Post Reply