Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve web UI without installation #694

Merged

Conversation

UlrichEckhardt
Copy link
Contributor

Heya!

This should be the final PR to easily support Slim (or any PSR-compatible framework) out of the box. This allows setting the installation path for the web UI files to false in order to turn off installation altogether. Instead, it then serves the files of the web UI from the '/clockwork' root dir as well.

This serves two use-cases:

  • The htdoc directory on your system is not writable, so Clockwork can't install any files. This should be the default for every web server, just as a security measure.
  • Every request goes through the a CGI script, so there is no directory where an installed file would become visible automatically. This is the case e.g. when using php -S localhost:8080 -t public public/index.php to serve a web interface.

Cheers!

Uli

@itsgoingd
Copy link
Owner

Hey, thanks for another great PR, looks promising. I will try to review and merge it this week.

Document that you can set the installation path to `false` in order to
serve the web UI in-place, i.e. without copying it to some publicly
served folder.
This treated only the root (typically '/clockwork') as part of
the web UI. Now, it treats that and everything inside that dir
as parts of the web UI.
In particular, you can now send a 'Content-type' header, so that
this can be used to serve any type of file in the response.
This used to only serve the root HTML doc as container for the iframe with
the actual app. Now, it treats anything under the root path (typically
'/clockwork') as a web asset and serves it accordingly.
@itsgoingd itsgoingd merged commit dc57796 into itsgoingd:master Oct 20, 2024
@itsgoingd
Copy link
Owner

I ended up reworking this slightly and making it a default, which is a small breaking change for people using the web UI without specifying the paths explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants