P
P
Pavel Vinogradov2020-12-02 10:51:35
Bitrix24
Pavel Vinogradov, 2020-12-02 10:51:35

Why is the local server application not deployed in Bitrix24?

Hello, tell me about the implementation of
this test application on Bitrix24
Server local application with an interface in Bi...
SSL protocol is installed for apache2
using Ubuntu
in settings.php

define('C_REST_CLIENT_ID','local.5fc73d8a549e12.73648251');//Application ID
define('C_REST_CLIENT_SECRET','zRz9riYqyBBwE4ynMfXf1KyTaNfB4IdDXe0W5mTv6sQmev4R5a');//
define('C_REST_CURRENT_ENCODING','windows-1251');

the rest of the lines are commented out
5fc747101795b190285723.png
in index.php
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Quick start. Local server-side application with UI</title>
</head>
<body>
  <div id="auth-data">OAuth 2.0 data from REQUEST:
    <pre><?php
      print_r($_REQUEST);
      ?>
    </pre>
  </div>
  <div id="name">
    <?php
    require_once (__DIR__.'/crestcurrent.php');

    //$result = CRest::call('user.current');
    $result = CRestCurrent::call('user.current');

    echo $result['result']['NAME'].' '.$result['result']['LAST_NAME'];
    ?>
  </div>
</body>
</html>


as a result,
5fc7471e1a8ab323143353.png

the second day of dancing with tambourines, and those supporters are silent

who did this, tell me what could be, since there is an order for the development of an application in Bitrix24 with NG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2020-12-02
@Pavel-Vinogradov

Have you done this on your PC?
those. and Bitrix and local application work on your PC? Or did you host it on a server?
How does the application work?
- Bitrix will check for access to the corresponding address. The correct resolve will be checked.
- Bitrix will redirect you to a special page where the application will open in the iframe. Those. if the application lies then 127.0.0.1 will be taken into account relative to your PC, not the server.
- Installation steps will be taken and after BX.installFinish you will see the index page of your application.
So 127.0.0.1 will be different end addresses for you and for your server.
If you are using a cloud server, then your application must either be a zip archive (i.e. without links, event handlers, etc.) or be accessible from outside (127.0.0.1 is your local address).
I see you have a secure connection. Bitrix requires a correct full certificate, which means that if you do not have a chain or it is not correct, then such a link will not open (even if the last certificate you have added to the trusted ones and the browser opens it without warnings).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question