• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Issue Allowing $POST from other Origins (Smartphone Web App)

Cellenseres

New Pleskian
Hey Guys,

I'm currently on Ubuntu 18.04.5 LTS‬ and have Plesk Obsidian 18.0.33 Update Nr. 1 installed.

I'm currently working on a smartphone web application (for private uses) which should be able to send PHP $POST to my Server where I've setup a Subdomain just for the use for this Project.
Unfortunately sending $POST from my App to my Server results in nothing. My Server doesn't seem to accept the $POSTs sent by my Web application and I'm fairly sure this happens due to wrong settings in Plesk.

I've tried it on my local PC before (using XAMPP and its Apache Service where it just works fine.

I've tried to add additional nginx directives for the Domain I want to use for my project:
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type';


I've tried so many different things, but nothing worked.
I just want to be able to send User Input from my App via $POST to my Server, let it do its thing (use the input to log me in and sending a message back to the App).
 
Back
Top