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

Online API Documentation refuses to show source #973

Open
faxm0dem opened this issue Apr 24, 2020 · 9 comments
Open

Online API Documentation refuses to show source #973

faxm0dem opened this issue Apr 24, 2020 · 9 comments
Assignees

Comments

@faxm0dem
Copy link
Contributor

When clicking on "View Source" on the API docs we get this:

Blocked by Content Security Policy
@jamtur01
Copy link
Member

@aphyr controls the host and I suspect will need to make some changes to server headers.

@aphyr
Copy link
Collaborator

aphyr commented Apr 24, 2020

Huh, this is all github hosted... wonder if they changed an origin CSP or something.

@aphyr
Copy link
Collaborator

aphyr commented Apr 24, 2020

Ahhhh, it's mad because we try to frame it from the riemann.io domain. Hmmmmmm.

@jamtur01
Copy link
Member

Oh. Yeah GH pages. No coffee yeah.

@aphyr
Copy link
Collaborator

aphyr commented Apr 24, 2020

Hmm. Both pages are hosted by github pages on riemann.io, so... you'd think same-origin would be OK. Browser security models have changed so much since I was last up on this stuff. Lemme google around...

@aphyr
Copy link
Collaborator

aphyr commented Apr 24, 2020

Yeah, it doesn't look like we get any control over the content security policy at the repo level. As a quick fix, we could replace the frame with a regular old link--users wouldn't get the top nav bar any more, but that's not the end of the world. Another option would be to do some sort of HTML rewriting as a build step when CODOX gets built. Or we could move riemann.io to its own server somewhere?

@aphyr
Copy link
Collaborator

aphyr commented Apr 24, 2020

Possssibly we could work around this with a <meta http-equiv="Content-Security-Policy" content="...">? I'm not sure what takes precedence...

@jamtur01
Copy link
Member

Unfortunately, frame-ancestors isn't supported in meta tags. :(

@faxm0dem
Copy link
Contributor Author

faxm0dem commented May 2, 2020

IMHO a simple link to the gh source would be a lesser evil and good compromise for work involved/functionality

The web sucks in 2020 doesn't it?

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

3 participants