CSP CSS and Javacript block

Hi, new to NextCloud. I created an index doing simple code and created folder with my files.

link rel=“stylesheet” type=“text/css” href=“/css/datatables.css”
script type=“text/javascript” src=“/src/datatables.js”

but i am getting a error with the css that it been “Refuse to apply the style” and for the javascript i getting the (blocked:csp).

How can i unblock my css and javascript? there is a code that will bypass this problem or do i need to change file?

Are you trying to make an html page?

That is dangerous on a cloud server, so you have been warned.

But serving a directory with an index.html file and/or any other html file is possible with this tiny app.

You should know what you are doing, because you have to edit the CSP entries a bit for the needs of your usecase.

btw: The app has not been maintained for a long time and needs to be adjusted so that it does not produce errors in the log ({$var} instead of ${var}).

Here a random calculator written in javascript as an example with html and css:

Seen as normal cloud files

Seen as website


Much and good luck,
ernolf