• I have tried multiple times to enable CF worker and it’s always some error

    workers.api.error.invalid_route_script_missing (err code: 10019)

    Error: undefined Unexpected token h in JSON at position 0

    Invalid request headers (err code: 6003)
    ————————
    I have tried “Try disabling the worker mode. Enable the page cache and then again enable the worker mode and enable page cache again.”

    I have tried deploying this custom code: https://gist.github.com/isaumya/c2667b737d4e1e48a8ebb0df24b89a39

    But the worker feature still not working,

    My main goal is to remove this ?swcfpc=1 at the end of URL cause it’s causing support issues while sharing URLs, also causing some 404 issues for logged non-admin in users, and 404 issues that the redirect feature isn’t solving.

Viewing 1 replies (of 1 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @agustin8_4,
    First of all when you enable the worker mode inside the plugin the cache buster (?swcfpc=1) gets automatically removed as the worker mode does not use the cache buster. This is clearly explained in the FAQ tab of the plugin settings. SO, you don’t need any custom worker code for that.

    Now coming to the issue you are talking about, it seems like you already have an worker inside your cloudflare account which the same route which this plugin is trying to set. Please note that one route (e.g. https://example.com/*) can be part of one worker only. If you have multiple other worker pointing to the same site, I will recommend you to remove the routes from those worker and try again.

    I think this thread will help you: https://www.ads-software.com/support/topic/workers-api-error-invalid_route_script_missing-err-code-10019/

Viewing 1 replies (of 1 total)
  • The topic ‘workers.api.error.invalid_route_script_missing (err code: 10019)’ is closed to new replies.