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

Separate Route for Public Resource Files #273

Open
williams-jack opened this issue Jun 26, 2023 · 0 comments
Open

Separate Route for Public Resource Files #273

williams-jack opened this issue Jun 26, 2023 · 0 comments

Comments

@williams-jack
Copy link
Contributor

  1. Add a route get "resources/*path* that routes to FilesController#resource
  2. Add a class-wide dictionary to FilesController for the resources it can serve
  3. Each grader (CheckerGrader, JunitGrader, etc) can install its relevant files in that dictionary: the key is the path to be used, and the value is the absolute path to the resource in the filesystem
  4. FilesController#resource will use the dictionary as an allow-list of what resources to serve, and reject all other paths

Example usage: A CheckerGrader would send a job to Orca containing resources/tester.jar, resources/javalib.jar, files/...the instructor test files... and files/...the student submission.... The resources paths are static, and do not live in the same namespace (filesystem directory) as other uploaded files, hence the need for the new route.

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

No branches or pull requests

1 participant