Dynamic options via JSON API on field not working

I’m on Kirby 2.3 and trying to get a blueprint field to accept JSON options, as described in the docs. My setup is the same as the docs:

title: Last name letter
pages: true
files: false
        label: Letter
        type:  text
        label: Category
        type: checkboxes
        default: architecture

api.json is:

  "id": "Design",
  "architecture": "Architecture",
  "photography": "Photography",
  "3d": "3D",
  "web": "Web"

Yet no checkboxes are displayed when editing the page. Why would that be?

The URL probably does not validate:

public function isUrl($url) {
      v::url($url) or
      str::contains($url, '://localhost') or
      str::contains($url, '://');

Although it should. Can you test on a remote url if it is the validator or something else? Or try localhost?

Update: just tested this on my system and when I call http://192.xxx/… it does not work either, while localhost does.


You are right, replacing the IP with localhost resolves the problem. Thank you!