• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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