inmanta / inmanta-ui

Inmanta UI extension for hosting the console
Apache License 2.0
0 stars 0 forks source link

Resource name conflict with routing to config.json #593

Open LukasStordeur opened 1 month ago

LukasStordeur commented 1 month ago

See thread : https://inmanta.slack.com/archives/C045Y42N49W/p1721317870833269

When a resource is named config.json, it will result in a conflict with our local config.json file upon refreshing the page displaying that resource.

We cshould improve the handler regex in n inmanta-ui for this. However, we made it this liberal so that it works for any view in the SPA. the regex needs to be adjusted, probably with a $ at the end of it.

https://github.com/inmanta/inmanta-ui/blob/97ffa4e69a444b0e85a09a9e07d71fa1eccd0c42/src/inmanta_ui/ui.py#L112 server.add_static_content(r"/console/(.*)config.js", content=config_js_content)

LukasStordeur commented 1 month ago

task for core.