-
Notifications
You must be signed in to change notification settings - Fork 189
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
For #2399: Host material-dashboard demo page for status service #2420
For #2399: Host material-dashboard demo page for status service #2420
Conversation
@humphd it's running locally at |
Please add the following files:
|
We don't autodeploy backend PRs, so there's no way to test this except locally or when we merge to staging. |
@humphd I have a problem executing this script.
My guess is that somewhere in Satellite or the app, Content Security Policy is set to use the script from the same origin only (i.e. script-src 'self'; or the fallback default-src 'self'; ). Tried looking around but couldn't find where it was set.
I did try to copy that script and serve as a local file, but it sent cross-origin requests and those were blocked as well. EDIT: I also tried to set the header but this code had no effects const service = new Satellite();
service.app.use(function (req, res, next) {
res.setHeader('Content-Security-Policy', 'script-src https://kit.fontawesome.com;')
next();
}); |
Have a look at what @manekenpix is doing in https://github.com/Seneca-CDOT/telescope/pull/2396/files#diff-dd124cd0e5175e20634ddd2804c09615115a059bee018935192c6aad783050ffR14-R28:
You'll need to add a |
Does this still need to be a draft PR, or is it ready to review? |
@humphd ah, I was waiting for the tests to complete and then I forgot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but let's improve our static analysis tooling so it doesn't complain about things (I'm amazed this passes eslint/prettier checks currently, did you have to fix things?):
- Add
src/api/status/public/assets/**
to https://github.com/Seneca-CDOT/telescope/blob/master/.eslintignore with a comment above about what it is and why we're ignoring (e.g., we don't maintain these files) - Add
src/api/status/public/assets
to https://github.com/Seneca-CDOT/telescope/blob/master/.prettierignore with a similar comment
After that, I think this can get merged.
move material-dashboard to /api/status add CHANGELOG, LICENSE, README resolve Content Security Policy update eslint and prettier ignore list
8df6cfa
to
5325f67
Compare
Then I'm surprised too. I only fixed those |
Issue This PR Addresses
Resolves #2399
Type of Change
Description
Deploy material-dashboard demo to /status
Test plan
cd ./src/api/status node ./src/server.js
The website is hosted at
http://localhost:1111/
Checklist