mirror of
https://github.com/dataforcanada/d4c-service-main-site.git
synced 2026-06-13 14:00:51 +02:00
Initial commit
This commit is contained in:
Generated
+30
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "worker",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"render2": "^1.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/range-parser": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/render2": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/render2/-/render2-1.5.0.tgz",
|
||||
"integrity": "sha512-q60V+O193o4bevaWgMHoN9II5BsH4purEemu+NJnx0bBZ3x4Hxfkq9t0puOKemRnOhYhwc39HPVLaKgmAehFBQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"range-parser": "^1.2.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"render2": "^1.5.0"
|
||||
}
|
||||
}
|
||||
Generated
+30
@@ -0,0 +1,30 @@
|
||||
lockfileVersion: '9.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
render2:
|
||||
specifier: ^1.5.0
|
||||
version: 1.5.0
|
||||
|
||||
packages:
|
||||
|
||||
range-parser@1.2.1:
|
||||
resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
|
||||
render2@1.5.0:
|
||||
resolution: {integrity: sha512-q60V+O193o4bevaWgMHoN9II5BsH4purEemu+NJnx0bBZ3x4Hxfkq9t0puOKemRnOhYhwc39HPVLaKgmAehFBQ==}
|
||||
|
||||
snapshots:
|
||||
|
||||
range-parser@1.2.1: {}
|
||||
|
||||
render2@1.5.0:
|
||||
dependencies:
|
||||
range-parser: 1.2.1
|
||||
@@ -0,0 +1,7 @@
|
||||
import render from 'render2'
|
||||
|
||||
export default {
|
||||
async fetch(request, env, ctx) {
|
||||
return render.fetch(request, env, ctx)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
name = "dataforcanada-website"
|
||||
main = "src/index.js"
|
||||
compatibility_date = "2022-05-15"
|
||||
# Set this to false if you don't want to use the default *.workers.dev route.
|
||||
# Note that *.workers.dev routes don't support native worker-level caching: https://developers.cloudflare.com/workers/runtime-apis/cache/
|
||||
workers_dev = true
|
||||
routes = [
|
||||
{ pattern = "www.dataforcanada.org", custom_domain = true }
|
||||
]
|
||||
|
||||
[vars]
|
||||
# The `access-control-allow-origin` header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
|
||||
# Optional, the `access-control-allow-origin` header is omitted if unset, which blocks all cross-origin requests.
|
||||
ALLOWED_ORIGINS = "https://www.dataforcanada.org"
|
||||
|
||||
# The `cache-control` header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control.
|
||||
# Optional, the `cache-control` header is omitted if unset, which would NOT disable caching: https://developers.cloudflare.com/workers/runtime-apis/cache/#headers
|
||||
# For example, you can disable all cache by setting this to `no-store`.
|
||||
CACHE_CONTROL = "max-age=86400, public"
|
||||
|
||||
# The string to prepend to each file path. Optional, nothing is prepended to the path if unset.
|
||||
PATH_PREFIX = ""
|
||||
|
||||
# Index file to search for on directory requests, set to "" to disable indexes
|
||||
# Relative to the directory of the request.
|
||||
#INDEX_FILE = ""
|
||||
INDEX_FILE = "index.html"
|
||||
|
||||
# File to fall back to when the requested path is not found in the bucket.
|
||||
# Incurs an additional read operation for 404 requests.
|
||||
# Set to "" to disable custom 404 fallbacks.
|
||||
# Relative to the root of the bucket.
|
||||
NOTFOUND_FILE = "404.html"
|
||||
|
||||
# Enable to show a directory listing fallback on paths ending in /
|
||||
# If INDEX_FILE is also provided, it will be used instead if the file exists.
|
||||
DIRECTORY_LISTING = true
|
||||
|
||||
# The number of items to show per page in directory listings.
|
||||
# Listings may also return less if the listing API call reaches a size limit.
|
||||
# Maximum of 1000.
|
||||
ITEMS_PER_PAGE = 1000
|
||||
|
||||
# Enable to hide files or directories beginning with . from directory listings.
|
||||
HIDE_HIDDEN_FILES = false
|
||||
|
||||
# Set a cache header here, e.g. "max-age=86400", if you want to cache directory listings.
|
||||
DIRECTORY_CACHE_CONTROL = "max-age=86400, public"
|
||||
|
||||
# Set debugging log enabled.
|
||||
LOGGING = false
|
||||
|
||||
# Set the number of retries allowed for each R2 operation (-1 for unlimited).
|
||||
R2_RETRIES = 0
|
||||
|
||||
[observability]
|
||||
enabled = false
|
||||
|
||||
[[r2_buckets]]
|
||||
binding = "R2_BUCKET"
|
||||
bucket_name = "dataforcanada-www" # Set this to your R2 bucket name. Required
|
||||
preview_bucket_name = "dataforcanada-www" # Set this to your preview R2 bucket name. Can be equal to bucket_name. Optional
|
||||
Reference in New Issue
Block a user