File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -79,15 +79,18 @@ you with CLI-only tools.
7979CLI-Only Routing
8080----------------
8181
82- In your **Routes.php ** file you can create routes that are only accessible from
82+ In your **app/Config/ Routes.php ** file you can create routes that are only accessible from
8383the CLI as easily as you would create any other route. Instead of using the ``get() ``,
8484``post() ``, or similar method, you would use the ``cli() `` method. Everything else
8585works exactly like a normal route definition:
8686
8787.. literalinclude :: cli/002.php
8888 :lines: 2-
8989
90- For more information, see the :doc: `Routes </incoming/routing >` page.
90+ For more information, see the :ref: `Routes <command-line-only-routes >` page.
91+
92+ .. warning :: If you don't disable auto-routing and place the command file in **app/Controllers**,
93+ anyone could access the command with the help of auto-routing via HTTP.
9194
9295The CLI Library
9396---------------
Original file line number Diff line number Diff line change @@ -335,7 +335,9 @@ You can use the ``add()`` method:
335335 only routes that match the current request method are stored, resulting in fewer routes to scan through
336336 when trying to find a match.
337337
338- Command-Line only Routes
338+ .. _command-line-only-routes :
339+
340+ Command-Line Only Routes
339341========================
340342
341343You can create routes that work only from the command-line, and are inaccessible from the web browser, with the
@@ -346,6 +348,9 @@ available from the command line:
346348.. literalinclude :: routing/028.php
347349 :lines: 2-
348350
351+ .. warning :: If you don't disable auto-routing and place the command file in **app/Controllers**,
352+ anyone could access the command with the help of auto-routing via HTTP.
353+
349354Global Options
350355==============
351356
You can’t perform that action at this time.
0 commit comments