search cancel

Patch Request REST API Time Entry Issue

book

Article ID: 238510

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

The company is using the call PATCH for time entries. 
There is a CORS error:

Access to XMLHttpRequest at 'https://server/ppm/rest/v1/timesheets/15441873/timeEntries/43311448' from origin 'http://localhostxxxxx' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource


 

Environment

Release : 15.8.1

Resolution

Review the origin mentioned in the error. In this example, the 'http://localhostxxxxx' should be removed by issuing the following commands:

--1
admin system-options -delete CORS_ALLOW_ORIGIN

--2
admin system-options -add CORS_ALLOW_ORIGIN '<https://server>'

--3
service stop start app