<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Enabling CORS in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75515#M4399</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;sorry for the delay.&lt;BR /&gt;It seems cors is once again your opponent here.&lt;BR /&gt;I tested it with enforcing cors completely off and it works.(older webbrowser),&amp;nbsp; You will have to publish afterwards that it becomes visible.&lt;BR /&gt;Not sure how you want come around this limitation, the only way i see here is proxying or altering the checkpoint config,.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2020 17:58:41 GMT</pubDate>
    <dc:creator>Daniel_Schlifka</dc:creator>
    <dc:date>2020-02-17T17:58:41Z</dc:date>
    <item>
      <title>Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/70990#M4233</link>
      <description>&lt;P&gt;Hi Checkmates,&lt;/P&gt;&lt;P&gt;Project:- Developing a Customized web portal using Checkpoint API for different users via C# .&lt;/P&gt;&lt;P&gt;Problem:- i made a add-host API call to checkpoint FW and getting the error in Browser &amp;gt;&amp;gt;Console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Error:-&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OPTIONS https://&amp;lt;FW_management_ip&amp;gt;/web_api/add-host 401(Unauthorized)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Access to XMLHttpRequest at '&lt;U&gt;https://&amp;lt;FW_management_ip&amp;gt;/web_api/add-host&lt;/U&gt;' from origin '&lt;U&gt;http://localhost:53352'&lt;/U&gt; 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.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;conclusion:- Some CORS policy has to be enabled or '&lt;EM&gt;Access-Control-Allow-Origin' has to be included&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;How to do this ?&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 13:05:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/70990#M4233</guid>
      <dc:creator>kartik_galhotra</dc:creator>
      <dc:date>2019-12-20T13:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/71011#M4234</link>
      <description>I suspect it’s an issue with what’s making the API call.&lt;BR /&gt;What does $FWDIR/log/api.elg say when you make the API call?&lt;BR /&gt;Also, what version of management is this?</description>
      <pubDate>Fri, 20 Dec 2019 18:47:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/71011#M4234</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-12-20T18:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74834#M4360</link>
      <description>&lt;P&gt;Hi PhoneBoy,&lt;/P&gt;&lt;P&gt;Was away due to work.&lt;/P&gt;&lt;P&gt;Regarding the Issue in hand&amp;nbsp;&lt;/P&gt;&lt;P&gt;a) From Expert mode in CLI was able to read api.log File using Vi editor.&lt;/P&gt;&lt;P&gt;But was not able to export it using IKEVIEW.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Needed your guidance to read the api.logs file.&lt;/P&gt;&lt;P&gt;Thank You&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 17:42:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74834#M4360</guid>
      <dc:creator>kartik_galhotra</dc:creator>
      <dc:date>2020-02-11T17:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74836#M4361</link>
      <description>IKEView is only for VPN-related debugs, not for API ones.&lt;BR /&gt;So you have to manually review the related files.&lt;BR /&gt;&lt;BR /&gt;But now that I'm coming back to this, are you making the request with an HTTP GET?&lt;BR /&gt;Because if you're using HTTP OPTIONS, that definitely won't work.</description>
      <pubDate>Tue, 11 Feb 2020 18:04:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74836#M4361</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-02-11T18:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74839#M4362</link>
      <description>As Mentioned in the API Reference guide, I am making the request with an HTTP Post.</description>
      <pubDate>Tue, 11 Feb 2020 18:11:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74839#M4362</guid>
      <dc:creator>kartik_galhotra</dc:creator>
      <dc:date>2020-02-11T18:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74840#M4363</link>
      <description>If you want help parsing the api logs, they need to be provided somehow.&lt;BR /&gt;If you don't want to do so here, I recommend a TAC case.</description>
      <pubDate>Tue, 11 Feb 2020 18:21:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74840#M4363</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-02-11T18:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74845#M4366</link>
      <description>&lt;P&gt;&lt;BR /&gt;CORS issues are usually related to the webbrowsers security policies,&amp;nbsp; this means your requests come from the Browser via ECMAscript/Typescript(aka javascript).&lt;BR /&gt;C# does not suffer from such(and neither do node.js)&lt;BR /&gt;If you build a webapp with c# backend, whats the reason that the api calls come from the webclient and not from the c# service?&amp;nbsp;&lt;BR /&gt;In a clean ddd your webclient would speak with the c# service, and the service speaks with the API.&lt;BR /&gt;If this is a resource issue for your backend consider usage of async await and if even that is not enough establish CQRS with event-queuing.&lt;BR /&gt;&lt;BR /&gt;Also never ever use CORS with a wildcard, instead propagate the resource which shall really be requested(at least provide the host ip). Setting a wildcard like * exposes your application for CSRF attacks.&lt;BR /&gt;It is the opposite of defensive programming and security bad practice.&lt;BR /&gt;&lt;BR /&gt;CORS has its purpose and shall provide a secure workaround for SOP inside webbrowsers, for APIs it's a constant pain. AJAX might be simply not the right tool here.&lt;BR /&gt;&lt;BR /&gt;Checkpoint has no influence on customer network designs, therefore they would have really difficulties to define clean CORS Headers(for example every NAT would mess it up).&lt;BR /&gt;You can of cause raise a feature request to checkpoint, but i have some doubts they will implement it for the given reasons.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 18:42:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/74845#M4366</guid>
      <dc:creator>Daniel_Schlifka</dc:creator>
      <dc:date>2020-02-11T18:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75017#M4373</link>
      <description>&lt;P&gt;Hi PhoneBoy,&lt;/P&gt;&lt;P&gt;Was able to get the api.elg logs.&lt;/P&gt;&lt;P&gt;After executing my C# code, was able to login and get the session-ID.&lt;/P&gt;&lt;P&gt;But when adding a new host, that is, Running "add-host" API.&lt;/P&gt;&lt;P&gt;It does not adds new host.&lt;/P&gt;&lt;P&gt;The following are the logs from api.elg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;ID: 13&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Address: &lt;A href="http://127.0.0.1:50276/web_api/login" target="_blank"&gt;http://127.0.0.1:50276/web_api/login&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Encoding: ISO-8859-1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Http-Method: POST&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Content-Type: application/json&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Headers: {Accept=[undefined], accept-encoding=[gzip, deflate, br], Accept-Language=[en-GB,en-US;q=0.9,en;q=0.8], connection=[keep-alive], Content-Length=[38], content-type=[application/json], Host=[127.0.0.1:50276], Origin=[http://localhost:53352], Referer=[http://localhost:53352/Login.html], Sec-Fetch-Mode=[cors], Sec-Fetch-Site=[cross-site], User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36], X-Forwarded-For=[192.168.70.10], X-Forwarded-Host=[192.168.70.12], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[192.168.70.12]}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;--------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;2020-02-12 21:36:34,846 INFO com.checkpoint.management.web_api_is.utils.helpers.ApiCache.&amp;lt;init&amp;gt;:25 [qtp273713186-29] - Cache created and initialized&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;2020-02-12 21:36:34,847 INFO com.checkpoint.management.web_api.web_services.WebApiEntryPoint.logRequestedCommandInfo:132 [qtp273713186-29] - Executing [login] of version 1.1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;2020-02-12 21:36:35,576 INFO com.checkpoint.management.web_api_is.utils.CsvFileWriterUtils.writeCsvLine:1 [qtp273713186-29] - 2020-02-12,21:36:35 +0530,login,PASSED,730&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;2020-02-12 21:36:35,587 INFO org.apache.cxf.interceptor.LoggingOutInterceptor.log:250 [qtp273713186-29] - Outbound Message&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;---------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;ID: 13&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Response-Code: 200&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Content-Type: application/json&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Headers: {Content-Type=[application/json], Date=[Wed, 12 Feb 2020 16:06:35 GMT]}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Payload: {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"uid" : "fe8a9e54-9e6d-4e29-9bf5-ebedf6895d41",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"sid" : "WMBQBmF8Ybu6SQLHQk0Lf51Zz2gIig8lbAcoe7CQX5U",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"url" : "&lt;A href="https://192.168.70.12:443/web_api" target="_blank"&gt;https://192.168.70.12:443/web_api&lt;/A&gt;",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"session-timeout" : 600,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"last-login-was-at" : {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"posix" : 1581523449487,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"iso-8601" : "2020-02-12T21:34+0530"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;"api-server-version" : "1.1"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;--------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;2020-02-12 21:37:00,583 INFO org.apache.cxf.interceptor.LoggingInInterceptor.log:250 [qtp273713186-26] - Inbound Message&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;----------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;ID: 14&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Address: &lt;A href="http://127.0.0.1:50276/web_api/add-host" target="_blank"&gt;http://127.0.0.1:50276/web_api/add-host&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Http-Method: OPTIONS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Content-Type:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;Headers: {Accept=[*/*], accept-encoding=[gzip, deflate, br], Accept-Language=[en-GB,en-US;q=0.9,en;q=0.8], Access-Control-Request-Headers=[content-type,x-chkp-sid], Access-Control-Request-Method=[POST], connection=[keep-alive], Content-Type=[null], Host=[127.0.0.1:50276], Origin=[http://localhost:53352], Referer=[http://localhost:53352/AddHost.html], Sec-Fetch-Mode=[cors], Sec-Fetch-Site=[cross-site], User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36], X-Forwarded-For=[192.168.70.100], X-Forwarded-Host=[192.168.70.12], X-Forwarded-Host-Port=[443], X-Forwarded-Server=[192.168.70.12]}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;--------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;2020-02-12 21:37:00,583 ERROR com.checkpoint.management.web_api.core.cxf.interceptor.WebApiInInterceptorSessionValidator.handleMessage:11 [qtp273713186-26] - Session validation has failed&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;2020-02-12 21:37:00,584 ERROR com.checkpoint.management.web_api_is.utils.helpers.ThreadLocalStore$1.initialValue:4 [qtp273713186-26] - ThreadLocalStore.requestedVersion was requested before initialization! Initializing it with the latest API version: 1.1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;2020-02-12 21:37:00,603 INFO org.apache.cxf.interceptor.LoggingOutInterceptor.log:250 [qtp273713186-26] - Outbound Message&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;---------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;ID: 14&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Response-Code: 401&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Content-Type: text/plain&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Headers: {Content-Type=[text/plain], Date=[Wed, 12 Feb 2020 16:07:00 GMT]}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Payload: code: "generic_err_missing_session_id"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;message: "Can't retrieve session id from HTTP request method: [OPTIONS]"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;--------------------------------------&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;In Visual Basic and Browser &amp;gt;&amp;gt; Inspect &amp;gt;&amp;gt; Console it displays the error:-&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Failed to load resource: the server responded with a status of 404 (Not Found) [http://localhost:53352/favicon.ico]&lt;BR /&gt;Access to XMLHttpRequest at '&lt;A href="https://192.168.70.12/web_api/add-host" target="_blank"&gt;https://192.168.70.12/web_api/add-host&lt;/A&gt;' from origin 'http://localhost:53352' 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. [http://localhost:53352/AddHost.html]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Also, specify the changes that are to be done.!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 17:47:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75017#M4373</guid>
      <dc:creator>kartik_galhotra</dc:creator>
      <dc:date>2020-02-12T17:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75026#M4375</link>
      <description>&lt;P&gt;The ultimate reason the API call is failing is because the SID isn't getting passed.&lt;BR /&gt;The CORS policy is definitely what's preventing these headers from coming across.&lt;BR /&gt;Like&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/10186"&gt;@Daniel_Schlifka&lt;/a&gt;&amp;nbsp;points out, this is configured the way it is for security reasons.&lt;BR /&gt;My understanding is this needs to be fixed on the client side.&lt;BR /&gt;For example, something like:&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://stackoverflow.com/questions/20035101/why-does-my-javascript-code-get-a-no-access-control-allow-origin-header-is-pr" target="_blank"&gt;https://stackoverflow.com/questions/20035101/why-does-my-javascript-code-get-a-no-access-control-allow-origin-header-is-pr&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;We do not provide a mechanism to change the CORS policy on the server side.&lt;BR /&gt;This would have to be treated as an RFE.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 19:05:19 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75026#M4375</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-02-12T19:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75044#M4376</link>
      <description>&lt;P&gt;I would not recommend to disable it from clientside.&lt;BR /&gt;Sadwise modern day browsers(at least Firefox, Edge and Chrome) only can disable SOP in general and there is no option to just disable it for a certain site. So disabling it is a all or nothing thing and it will expose &lt;U&gt;all&lt;/U&gt; web applications which run inside that browser for csrf.&amp;nbsp; Depending on environment it might also collide with security compliance rules or you have some 3rd parties where you can't influence the browser setup at all.&lt;BR /&gt;If you don't have the time to rewrite the whole thing(which i assume) the easiest way would be put a proxy in between the clients and the checkpoint and rewrite the http-headers between the firewall und your client to add an according&amp;nbsp; Allow-Origin header to this resource. At least squid, apache and nginx offer such features. As these are only some API calls a really slim vm setup somewhere in your management network would do the trick.&lt;BR /&gt;Personally i would recommend nginx, in comparison with Apache and Squid the config is easy going and less complex for this purpose.&lt;BR /&gt;&lt;BR /&gt;A basic nginx config would look like that(you can of cause spice it up - refer nginx docs for this):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;server {
    listen       443;
	ssl on;
	ssl_certificate           /etc/nginx/cert.crt;
    ssl_certificate_key       /etc/nginx/cert.key;
	ssl_protocols TLSv1.2;
    location / {		
        proxy_pass https://&amp;lt;checkpoint-ip&amp;gt;;
		add_header 'Access-Control-Allow-Origin' '&amp;lt;checkpoint-ip&amp;gt;/web_api/*';
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 23:52:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75044#M4376</guid>
      <dc:creator>Daniel_Schlifka</dc:creator>
      <dc:date>2020-02-12T23:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75088#M4379</link>
      <description>&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7"&gt;@PhoneBoy&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Read the StackOverFlow Link Your specified and tried to implement,&lt;/P&gt;&lt;P&gt;None Worked.!&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/10186"&gt;@Daniel_Schlifka&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per Your suggestion tried Proxy, but Some... Chrome Extensions,&lt;/P&gt;&lt;P&gt;Not Useful.!&lt;/P&gt;&lt;P&gt;So here I am Posting My Code:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Login.html&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;html&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;head&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;meta charset="utf-8" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/head&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;body&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;table border="1"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;strong&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;User Name:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/strong&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;input type="text" id="txt_username" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;strong&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Password:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/strong&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;input type="password" id="txt_password" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;input id="btn_login" type="button" value="Login" onclick="Login()" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/table&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;!--ek min m aata hu--&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;script src="Scripts/jquery-3.4.1.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;var url = '&lt;A href="https://192.168.70.12/web_api/" target="_blank" rel="noopener"&gt;https://192.168.70.12/web_api/&lt;/A&gt;';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;function Login() {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;var username = $('#txt_username').val();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;var password = $('#txt_password').val();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;var obj = { "user": username, "password": password };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;obj = JSON.stringify(obj);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;$.ajax({&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;url: url + 'login',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;type: 'POST',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;contentType: 'application/json',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;accepts: 'application/json',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;data: obj,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;success: function (response) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;alert('Login successfully');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;sessionStorage.setItem('sessionid', response.sid);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;sessionStorage.setItem('userid', response.uid);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;window.location.href = 'AddHost.html'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;error: function (a, b, c) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;alert('There is error');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;console.log(a);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;console.log(b);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;console.log(c);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;})&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/script&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/body&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/html&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;AddHost.html&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;html&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;head&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;meta charset="utf-8" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/head&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;body&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;table border="1"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;strong&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Host Name:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/strong&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;input type="text" id="txt_hostname" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;strong&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Ip address:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/strong&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;input type="text" id="txt_ipaddress" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;input type="button" value="Add Host" onclick="AddHost()" /&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/td&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/tr&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/table&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;script src="Scripts/jquery-3.4.1.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;$(document).ready(function () {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;if (sessionStorage.getItem('sessionid') == null) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;window.location.href = 'Login.html';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;});&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;var url = '&lt;A href="https://192.168.70.12/web_api/" target="_blank" rel="noopener"&gt;https://192.168.70.12/web_api/&lt;/A&gt;';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;function AddHost() {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;var hostname = $('#txt_hostname').val();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;var ipAddress = $('#txt_ipaddress').val();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;var sessionId = sessionStorage.getItem('sessionid');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;var obj = { "name": hostname, "ip-address": ipAddress };&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;obj = JSON.stringify(obj);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;$.ajax({&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;type: 'POST',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;url: url + 'add-host',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;contentType: 'application/json',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;crossDomain: true,&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;headers: {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;'X-chkp-sid': sessionId,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;'Access-Control-Allow-Origin': "*",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;//"Authorization": "basic " + sessionId&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;accepts: 'application/json',&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;data: obj,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;//dataType: 'jsonp',&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;success: function (response) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;alert('created successfully');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;console.log(response);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;},&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;error: function (a, b, c) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;alert('There is error');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;console.log(a);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;console.log(b);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;console.log(c);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;})&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/script&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/body&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;lt;/html&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="4"&gt;Till Now Login is successfull but cannot add new host using webApi.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="4"&gt;The Code Contains some modifications(on AddHost.html) which i did after reading the stackoverflow articles.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="4"&gt;Thank you.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 11:12:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75088#M4379</guid>
      <dc:creator>kartik_galhotra</dc:creator>
      <dc:date>2020-02-13T11:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75179#M4380</link>
      <description>&lt;P&gt;What do you mean with "some chrome plugin" , thats like "the computer is broken".&lt;BR /&gt;Please describe how you tried to achieve it, then we can go through it and see what went wrong.&lt;BR /&gt;&lt;BR /&gt;Your javascript syntax is somewhat unfamiliar, but many ways lead to rome. I will test it locally and will give you some feedback tomorrow regarding this.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 16:07:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75179#M4380</guid>
      <dc:creator>Daniel_Schlifka</dc:creator>
      <dc:date>2020-02-13T16:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75191#M4381</link>
      <description>&lt;P&gt;While reading some articles i encountered alternative to CORS that's where i got to know about, The Chrome Extensions.&lt;/P&gt;&lt;P&gt;&lt;A href="https://chrome.google.com/webstore/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf" target="_blank" rel="noopener"&gt;Find It Here.&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, In some articles and &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7"&gt;@PhoneBoy&lt;/a&gt;&amp;nbsp; reply i learned that, this CORS can be done from server-side too.&lt;/P&gt;&lt;P&gt;As , the Checkpoint it in my test environment (VMware) and i have wrote my code in Visual Studio 2017.&lt;/P&gt;&lt;P&gt;So, Just to Give it a shot&lt;span class="lia-unicode-emoji" title=":crossed_fingers:"&gt;🤞&lt;/span&gt;, I got into the Checkpoint_FW &amp;gt;&amp;gt;web &amp;gt;&amp;gt;config &amp;gt;&amp;gt; httpd2.conf and commented the very last line&amp;nbsp;&lt;/P&gt;&lt;P&gt;which is SAMEORIGIN. But, Unfortunately, it was all in vain.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/10186"&gt;@Daniel_Schlifka&lt;/a&gt;&amp;nbsp;i am dropping the UI associated with code.&lt;/P&gt;&lt;P&gt;For Login.html&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="LoginPage.PNG" style="width: 468px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/4442iE486DB360F409AF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="LoginPage.PNG" alt="LoginPage.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;For AddHost.html&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="AddHostPage.PNG" style="width: 461px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/4443i9129F5EC48797875/image-size/large?v=v2&amp;amp;px=999" role="button" title="AddHostPage.PNG" alt="AddHostPage.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope we resolve the issue.!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 17:45:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75191#M4381</guid>
      <dc:creator>kartik_galhotra</dc:creator>
      <dc:date>2020-02-13T17:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75515#M4399</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;sorry for the delay.&lt;BR /&gt;It seems cors is once again your opponent here.&lt;BR /&gt;I tested it with enforcing cors completely off and it works.(older webbrowser),&amp;nbsp; You will have to publish afterwards that it becomes visible.&lt;BR /&gt;Not sure how you want come around this limitation, the only way i see here is proxying or altering the checkpoint config,.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 17:58:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75515#M4399</guid>
      <dc:creator>Daniel_Schlifka</dc:creator>
      <dc:date>2020-02-17T17:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75558#M4403</link>
      <description>&lt;P&gt;When using Older Browser, did you added proxy or just using the older browser resolves the issue ?&lt;/P&gt;&lt;P&gt;and what version of browser did u select ?&lt;/P&gt;&lt;P&gt;Also Please, Specify (if any) changes you have done to the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 07:24:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75558#M4403</guid>
      <dc:creator>kartik_galhotra</dc:creator>
      <dc:date>2020-02-18T07:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75603#M4405</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;&lt;BR /&gt;i used ff36.0.4 it has no cors enabled, so no proxy here. It's completely outdated, i keep it for backward compability reasons only and wouldn't recommend it for daily usage.&lt;BR /&gt;I did some slight adjustments for my login. I will upload it to github and send you a link.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 18:11:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75603#M4405</guid>
      <dc:creator>Daniel_Schlifka</dc:creator>
      <dc:date>2020-02-18T18:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75608#M4406</link>
      <description>Personally, I think you're better off developing this in a way that doesn't invoke CORS.&lt;BR /&gt;A simple nginx proxy as previously suggested should be sufficient.&lt;BR /&gt;Why is this option not feasible?</description>
      <pubDate>Tue, 18 Feb 2020 18:34:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75608#M4406</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-02-18T18:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75677#M4407</link>
      <description>Hi,&lt;BR /&gt;as u mentioned, It Works for u, but i too was able to login from Login.html from beginning but was not able to add-host using AddHost.html.&lt;BR /&gt;&lt;BR /&gt;Hope you were able to do the add-host using your code.!&lt;BR /&gt;will be waiting for your code.</description>
      <pubDate>Wed, 19 Feb 2020 08:55:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75677#M4407</guid>
      <dc:creator>kartik_galhotra</dc:creator>
      <dc:date>2020-02-19T08:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling CORS</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75934#M4415</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;&lt;BR /&gt;i added you a plain example.&lt;BR /&gt;I used xmlhttprequest in this example, thats basically what jquery wraps around. I didn't take care for exception handling, but its identical to jquery in this point; you can easily recycle your code here. Using xmlhttprequest adds some boilerplate code but makes the whole communication more comprehensible. I also added a python example for the same thing. Its pretty similar in every language, no voodoo here. The api is astonishing easy to use(if cors is not in the way).&lt;BR /&gt;Consider using let instead of var. My test-ff was just to old to support ES6,&amp;nbsp; so i had to use var.&lt;BR /&gt;ES6 'let' is the smarter way as it avoids some ugly scoping hells from earlier javascript versions. Check ES6 docs for more detail.&lt;BR /&gt;&lt;A href="https://github.com/remingu/checkmates/tree/master/r80webapi" target="_blank"&gt;https://github.com/remingu/checkmates/tree/master/r80webapi&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 19:58:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Enabling-CORS/m-p/75934#M4415</guid>
      <dc:creator>Daniel_Schlifka</dc:creator>
      <dc:date>2020-02-20T19:58:41Z</dc:date>
    </item>
  </channel>
</rss>

