• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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