Commit Graph

81 Commits

Author SHA1 Message Date
Kyle Kelley
858d153bff Remove extraneous pass
YOU SHALL NOT PASS!
I rap fast like Shadowfax!
2014-12-02 15:12:14 -06:00
Kyle Kelley
219ca3046a Clean up default content security policy setup 2014-12-02 15:12:14 -06:00
Kyle Kelley
17d1c2d488 Report CSP violations as warnings. 2014-12-02 15:12:14 -06:00
Kyle Kelley
5343787e9d Remove CSP reporting since it fills console. 2014-12-02 15:12:14 -06:00
Kyle Kelley
5065429bfd Clean up logs, enable debug log for header except 2014-12-02 15:12:13 -06:00
Kyle Kelley
bd85ff25df Restrict frame-ancestors to 'self' in CSP 2014-12-02 15:12:13 -06:00
Kyle Kelley
3068733c46 Log reporter policy to debug 2014-12-02 15:12:13 -06:00
Kyle Kelley
cb19f07c9a csp_report_uri caused a cyclic dependency 2014-12-02 15:12:13 -06:00
Kyle Kelley
5b53d2db45 Set default policy to nothing, only report. 2014-12-02 15:12:13 -06:00
Kyle Kelley
23b9f09177 Log CSP violations via report 2014-12-02 15:12:13 -06:00
Kyle Kelley
a00d6930f2 Adapt headers to using Content Security Policy 2014-12-02 15:12:12 -06:00
Min RK
9a4de7b78d Merge pull request #7041 from takluyver/nbconfig-manager
ConfigManager class for frontend config
2014-12-01 11:32:09 -08:00
Thomas Kluyver
98cd14c04c Remove profile_dir from handler class 2014-11-25 18:10:14 -08:00
Thomas Kluyver
febd670716 First stab at ConfigManager class 2014-11-25 18:02:24 -08:00
Min RK
3cf5262b0c don't cache files in static/custom or nbextensions
always rely on 304 for cache content there
2014-11-24 21:29:45 -08:00
Min RK
a492ac554d add '?v=<date>' to require URLs
- resets cache on server restart
- don't cache requests on master (rely on 304 for content caching)
2014-11-24 20:58:04 -08:00
MinRK
fe730a60c2 set no-cache header in StaticFileHandlers
rely on 304 Not Modified for caching content
2014-11-24 20:19:55 -08:00
Min RK
e4e1d47203 Merge pull request #6694 from takluyver/config-rest-api
Add REST API for retrieving, storing and updating config
2014-11-12 21:40:30 -08:00
Min RK
a257e580a0 Merge pull request #6854 from takluyver/post-new-terminal
Create new terminals with POST request to API
2014-11-11 14:12:54 -08:00
Min RK
ba370731a5 fix and test path regexes
- require leading `/`
- match empty string
- disallow consecutive `//`

This means that path_regex should be included as `/api/whatever%s`, not `/api/whatever/%s`
2014-11-10 14:02:21 -08:00
MinRK
3ada0c2c27 Remove separate 'path', 'name' in Contents API
- path is full path (including name)
- name is only used for read-only convenience, and plays no role in any API
- remove 'untitled upload' (POST with content and no path)
2014-11-10 14:02:18 -08:00
Thomas Kluyver
a76a546627 Add REST API for retrieving, storing and updating config 2014-11-06 11:18:04 -08:00
Thomas Kluyver
f8ec8d4abe Various minor fixes from review 2014-11-03 10:18:28 -08:00
Thomas Kluyver
14106cbd66 Move contents API module into services 2014-11-03 10:18:27 -08:00
Jeff Hemmelgarn
53463898eb Move contentmanager to contents 2014-11-03 10:18:27 -08:00
KesterTong
3994d4d56a Adds configuration options to use Google Drive content manager
Adds the key contentmanager_js_source to webapp_settings that allows for specifying the content manager JavaScript source file.  Also adds a NotebookManager subclass, ClientSideNotebookManager, which does minimal logic.  This class is used when the JavaScript content manager doesn't use the Python notebook manager, but rather implements that logic client side, as is the case for the Google Drive based content manager.

A sample command line that uses the Google Drive content manager, and the ClientSideNotebookManager, is

ipython notebook --NotebookApp.webapp_settings="{'contentmanager_js_source': 'base/js/drive_contentmanager'}" --NotebookApp.notebook_manager_class="IPython.html.services.notebooks.clientsidenbmanager.ClientSideNotebookManager"
2014-11-03 10:18:04 -08:00
Min RK
96183a60a0 create new terminals with POST /api/terminals
instead of GET terminals/new

to be consistent with creating new notebooks.

We had to stop using GET notebooks/new
because browsers would create new notebooks when making preview thumbnails for commonly visited pages, etc.
I assume the same issue would apply to terminals
2014-11-02 11:09:03 -08:00
Bussonnier Matthias
5ecf6efdac cache sys-info 2014-10-29 14:55:12 +01:00
Matthias Bussonnier
e7c2c369e0 Add about dialog in Notebook Help Menu.
This allow to get info on version of IPython when running remotely.
The about dialog also send a kernel info request and display the banner
which is useful for non-python kernel that don't match IPython version
2014-10-16 17:04:19 +02:00
Bussonnier Matthias
76a54f0a82 Have /api return the IPython version
return version as a string, to be consistent with other APIs.

closes #6647
2014-10-10 19:28:04 +02:00
MinRK
568034c349 use write_error instead of get_error_html
get_error_html is removed in tornado 4.0
2014-08-15 13:41:13 -07:00
MinRK
fae77bd133 remove unused project_dir 2014-07-31 11:57:38 -07:00
MinRK
d4fe081fe5 move /files/ redirect to base handlers
and reuse it in /nbconvert/html/…

closes #6137
2014-07-31 11:57:37 -07:00
MinRK
0c0eb43719 teach contents service about non-notebook files 2014-07-31 11:57:36 -07:00
MinRK
6cce477e07 rename notebooks service to contents service
minimal functional changes, committing because tests are passing.
2014-07-31 11:57:36 -07:00
MinRK
579f5101f0 restore websocket_url configurable
allows ws to be handled via separate proxies,
as appears to be the case on OpenShift and some other hosting services.
2014-07-22 14:43:40 -07:00
rgbkrk
88e52b2746 Only allow iframe embedding on same origin. 2014-07-12 00:20:24 -05:00
MinRK
1edc97e34a s/cors_/allow_/
add notes about Tornado 4, and comments, updates per review
2014-06-30 10:40:31 -07:00
MinRK
acf0da01d9 make CORS configurable
allows setting CORS headers.

- cors_origin sets Access-Control-Allow-Origin directly
- cors_origin_pat allows setting Access-Control-Allow-Origin via regular expression, since the header spec itself doesn’t support complex access[1]
- cors_credentials sets Access-Control-Allow-Credentials: true

To allow CORS from everywhere:

    ipython notebook —NotebookApp.cors_origin='*'
2014-06-27 17:47:56 -07:00
MinRK
de0a7d7850 use utils.log.get_logger where appropriate 2014-06-24 20:16:46 -07:00
Thomas Kluyver
02fa348c69 Create REST API for kernel specs 2014-05-08 16:18:23 -07:00
MinRK
f824aee955 log error message when API requests fail 2014-04-23 12:41:27 -07:00
Paul Ivanov
d6f2dfefea log refusal to serve hidden files dirs 2014-03-03 12:35:37 -08:00
Matthias BUSSONNIER
a01c112b0f allow custom headers on all pages 2014-03-01 09:43:27 +01:00
MinRK
37cb0fbdee remove websocket url
websockets should follow the kernel URL

(normal behavior is unchanged, only unused configurability is removed)
2014-02-20 22:54:36 -08:00
MinRK
a184724bdb remove base_kernel_url 2014-02-11 21:26:10 -08:00
MinRK
e1e0b19a6a s/base_project_url/base_url/
deprecate NotebookApp.base_project_url
2014-02-08 23:09:24 -08:00
Brian E. Granger
eb9e0be218 Small refactoring of is_hidden to take root as default kwarg. 2014-02-05 16:43:11 -08:00
Brian E. Granger
0c794b5d2c 404 for hidden files to not revleal their existence. 2014-02-05 15:38:34 -08:00
Brian E. Granger
243392d810 Creating and testing IPython.html.utils.is_hidden. 2014-02-05 13:09:55 -08:00