Details
Assignee
Michael OffnerMichael OffnerReporter
Pierre DorflingPierre DorflingPriority
NewLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Pierre Dorfling
Pierre DorflingPriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 1 January 2022 at 19:35
Updated 2 June 2023 at 15:20
Hi there,
i am trying to setup a restful server for an angular app that I am building using lucee as the backend.
I am having trouble with preflight options and simply cannot get a resolution on this.
I have created a post test
http://api.foodfocusfindit.co.za:8888/rest/ffapi/expenseAPI/contact
If i hit this post via postman it works fine, however as soon as lucee sees the request come in via the browser it sees it as an OPTIONS (preflight) and not as a post. I understand why this is doing it.
However my code that initiates this call is as follows
<cffunction name="contactus" restpath="contact" access="remote" returntype="any" httpmethod="POST" produces="application/json">
So looking for a post and not an options. This kicks the request out with a 404 error saying the method cannot be found, which is obvious as i have set this to POST and not OPTIONS.
I have configured all the required headers with CFHEADER as well as set them in my web.config file.
GET requests works perfectly, however i simply cannot get past the preflight option;
Any help