Skip to content

Commit 7419d24

Browse files
committed
Rename docs_host → docs_origin
1 parent d6823d8 commit 7419d24

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

assets/javascripts/app/app.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
indexHost: ->
197197
# Can't load the index files from the host/CDN when applicationCache is
198198
# enabled because it doesn't support caching URLs that use CORS.
199-
@config[if @appCache and @settings.hasDocs() then 'index_path' else 'docs_host']
199+
@config[if @appCache and @settings.hasDocs() then 'index_path' else 'docs_origin']
200200

201201
onBootError: (args...) ->
202202
@trigger 'bootError'

assets/javascripts/app/config.coffee.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
app.config =
22
db_filename: 'db.json'
33
default_docs: <%= App.default_docs.to_json %>
4-
docs_host: '<%= App.docs_host %>'
4+
docs_origin: '<%= App.docs_origin %>'
55
env: '<%= App.environment %>'
66
history_cache_size: 10
77
index_filename: 'index.json'

assets/javascripts/models/doc.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class app.models.Doc extends app.Model
3030
"/#{@slug}#{path}"
3131

3232
fileUrl: (path) ->
33-
"#{app.config.docs_host}#{@fullPath(path)}?#{@mtime}"
33+
"#{app.config.docs_origin}#{@fullPath(path)}?#{@mtime}"
3434

3535
dbUrl: ->
36-
"#{app.config.docs_host}/#{@slug}/#{app.config.db_filename}?#{@mtime}"
36+
"#{app.config.docs_origin}/#{@slug}/#{app.config.db_filename}?#{@mtime}"
3737

3838
indexUrl: ->
3939
"#{app.indexHost()}/#{@slug}/#{app.config.index_filename}?#{@mtime}"

lib/app.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class App < Sinatra::Application
2626

2727
require 'yajl/json_gem'
2828
set :docs_prefix, 'docs'
29-
set :docs_host, -> { File.join('', docs_prefix) }
29+
set :docs_origin, -> { File.join('', docs_prefix) }
3030
set :docs_path, -> { File.join(public_folder, docs_prefix) }
3131
set :docs_manifest_path, -> { File.join(docs_path, 'docs.json') }
3232
set :default_docs, %w(css dom dom_events html http javascript)
@@ -75,7 +75,7 @@ class App < Sinatra::Application
7575
configure :production do
7676
set :static, false
7777
set :cdn_origin, 'https://cdn.devdocs.io'
78-
set :docs_host, '//docs.devdocs.io'
78+
set :docs_origin, '//docs.devdocs.io'
7979
set :csp, "default-src 'self' *; script-src 'self' 'nonce-devdocs' http://cdn.devdocs.io https://cdn.devdocs.io https://www.google-analytics.com https://secure.gaug.es http://*.jquery.com https://*.jquery.com; font-src data:; style-src 'self' 'unsafe-inline' *; img-src 'self' * data:;"
8080

8181
use Rack::ConditionalGet

0 commit comments

Comments
 (0)