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

Make override urls configurable #5503

Merged
merged 1 commit into from Oct 17, 2018

Conversation

@blink1073
Copy link
Member

@blink1073 blink1073 commented Oct 17, 2018

Follow up to #5462

@blink1073
Copy link
Member Author

@blink1073 blink1073 commented Oct 17, 2018

@blink1073 blink1073 merged commit cd265a4 into jupyterlab:master Oct 17, 2018
1 of 2 checks passed
@blink1073
Copy link
Member Author

@blink1073 blink1073 commented Oct 17, 2018

Released as 0.35.2

@eoinmurray
Copy link

@eoinmurray eoinmurray commented Oct 17, 2018

Still isn't working for me, I think its related to

https://github.com/jupyterlab/jupyterlab_server/blob/master/jupyterlab_server/handlers.py#L206

    if config.static_dir:
        public_path = ujoin(base_url, config.public_url + '(.*)')

Since base_url is always '/' even if I set it to "" using --NotebookApp.base_url="" so my public url always starts with '/' and then doesnt work?

@eoinmurray
Copy link

@eoinmurray eoinmurray commented Oct 17, 2018

I always get the following if I set the override_static_url to anything:

⚡ ~: jupyter lab --dev-mode --no-browser --LabApp.override_static_url='https://<something>.cloudfront.net' --NotebookApp.base_url=""

screen shot 2018-10-17 at 19 44 29

@blink1073
Copy link
Member Author

@blink1073 blink1073 commented Oct 18, 2018

Are you literally putting a < in the url?

@eoinmurray
Copy link

@eoinmurray eoinmurray commented Oct 18, 2018

@vidartf
Copy link
Member

@vidartf vidartf commented Oct 18, 2018

Normally, I would debug such issues by the "Network" tab in the developer tools. Then you can see the content of the reply from the static url. Maybe the reply is malformed?

@eoinmurray
Copy link

@eoinmurray eoinmurray commented Oct 18, 2018

Indeed, no matter what I set --LabApp.override_static_url to the response for the vendors.js and main.js files is the html content of the index, so its pointing to the wrong place. So the reponse is malformed, but it seems not to be fetching the correct links.

screen shot 2018-10-18 at 12 06 59

@eoinmurray
Copy link

@eoinmurray eoinmurray commented Oct 18, 2018

Exact same thing happens if I point the static url to itself on localhost,
--LabApp.override_static_url='http://localhost:8888'

@eoinmurray
Copy link

@eoinmurray eoinmurray commented Oct 18, 2018

None of these work either, same error

  • --LabApp.override_static_url='localhost:8888'
  • --LabApp.override_static_url='localhost:8888/'
  • --LabApp.override_static_url='localhost:8888/lab/static'
  • --LabApp.override_static_url='localhost:8888/lab/static/'
  • --LabApp.override_static_url='http://localhost:8888'
  • --LabApp.override_static_url='http://localhost:8888/'
  • --LabApp.override_static_url='http://localhost:8888/lab/static'
  • --LabApp.override_static_url='http://localhost:8888/lab/static/'

@blink1073
Copy link
Member Author

@blink1073 blink1073 commented Oct 18, 2018

Yikes, I'll try that locally when I get back to my dev machine and see if I can write a test case for this as well.

@blink1073
Copy link
Member Author

@blink1073 blink1073 commented Oct 19, 2018

Oof, this is a lot more insidious than I thought. We need to affect what HTMLWebpackPlugin uses for the paths to the main bundles. I tried making that {{page_config.publicUrl}}, but it adds a slash to that, giving us a url like /lab/static//main.js (with two slashes), which the server can't handle. I can't yet figure out how to fix this behavior...

@blink1073 blink1073 mentioned this pull request Oct 19, 2018
@jasongrout jasongrout removed this from the 0.35.x milestone Feb 2, 2019
@jasongrout jasongrout added this to the 1.0 milestone Feb 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants