Skip to content

Conversation

@marcogruhl
Copy link

From Discussion: #113
I hit a small road block when using PiOSK in an air gaped environment. The js and css scripts (bootstrap.bundle.min.js, bootstrap.min.css, jquery-3.7.1.min.js) don't load. I also can imagine usecases where the Pi are not allowed to load something from outside.

I implemented the downloading of the external scripts within the setup script and the paths in the index.html from the external to local.

Copilot AI review requested due to automatic review settings September 16, 2025 21:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables PiOSK to function in air-gapped environments by downloading external JavaScript and CSS dependencies locally during setup instead of relying on CDN links. This addresses the issue where external scripts (Bootstrap and jQuery) fail to load when internet access is restricted or unavailable.

  • Downloads external dependencies (jQuery, Bootstrap JS/CSS) to local files during setup
  • Updates HTML to reference local files instead of CDN URLs
  • Maintains integrity hashes for security validation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/setup.sh Adds download logic for external JS/CSS dependencies to store them locally
dashboard/index.html Updates script and stylesheet references from CDN URLs to local file paths

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@parthsidpara parthsidpara self-requested a review September 18, 2025 11:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +71 to +72
<script src="libs/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script src="libs/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integrity hashes will fail when loading local files since they were calculated for the original CDN versions. Remove the integrity attributes or update them to match the downloaded files' hashes.

Copilot uses AI. Check for mistakes.
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