        location /lapro_copy_datafile {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Credentials' 'true';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
            add_header 'Content-type' 'text/plain; charset=utf-8';

            content_by_lua '
                os.execute("rw && cp /tmp/logicData.bin /opt/redpitaya/www/apps/la_pro/");
            ';
        }

        location /lapro_rm_datafile {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Credentials' 'true';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
            add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
            add_header 'Content-type' 'text/plain; charset=utf-8';

            content_by_lua '
                os.execute("rw && rm -f /tmp/logicData.bin && rm -f /opt/redpitaya/www/apps/la_pro/logicData.bin");
            ';
        }

        location /check_datafile_exists {
            content_by_lua '
                local file = io.open("/opt/redpitaya/www/apps/la_pro/logicData.bin", "r");
                if file ~= nil then
                    io.close(file);
                    ngx.say("OK");
                else
                    ngx.say("Fail");
                end;
            ';
        }

