python-editor-v3 icon indicating copy to clipboard operation
python-editor-v3 copied to clipboard

Links to API docs containing periods result in a 403

Open microbit-matt-hillsdon opened this issue 2 years ago • 1 comments
trafficstars

Bug Description

This works: https://python.microbit.org/v/3/api/gc This does not: https://python.microbit.org/v/3/api/microbit.audio.SoundEffect (403 forbidden)

Presumably a glitch in the fallback routing that we have to serve the index page. Probably needs fixing outside this repo but tracking here.

microbit-matt-hillsdon avatar Feb 06 '23 14:02 microbit-matt-hillsdon

The routing function is using the presence of a dot in the final part to avoid sending the HTML of the app on the assumption it's an asset path. We either need a different rule or we change these URLs. As they've never worked that seems to be an option. E.g. s/[.]/-/g ? Or perhaps / ?

https://python.microbit.org/v/3/api/microbit/audio/SoundEffect seems like it makes perfect sense.

microbit-matt-hillsdon avatar Feb 06 '23 16:02 microbit-matt-hillsdon