添加 Mobileapps 配置文件
parent
ef7918b1aa
commit
3ddabe55bd
@ -0,0 +1 @@
|
||||
# 异世界百科 Mobileapps配置文件
|
@ -0,0 +1,106 @@
|
||||
# Number of worker processes to spawn.
|
||||
# Set to 0 to run everything in a single process without clustering.
|
||||
# Use 'ncpu' to run as many workers as there are CPU units
|
||||
num_workers: 0
|
||||
|
||||
# Log error messages and gracefully restart a worker if v8 reports that it
|
||||
# uses more heap (note: not RSS) than this many mb.
|
||||
worker_heap_limit_mb: 250
|
||||
|
||||
# Logger info
|
||||
logging:
|
||||
level: trace
|
||||
streams:
|
||||
- type: stdout # log to stdout
|
||||
named_levels: true # emit log level name instead of index. e.g. INFO vs 30
|
||||
# # Use gelf-stream -> logstash
|
||||
# - type: gelf
|
||||
# host: logstash1003.eqiad.wmnet
|
||||
# port: 12201
|
||||
|
||||
# Statsd metrics reporter
|
||||
metrics:
|
||||
type: statsd
|
||||
host: localhost
|
||||
port: 8125
|
||||
|
||||
services:
|
||||
- name: service-mobileapp-node
|
||||
# a relative path or the name of an npm package, if different from name
|
||||
module: ./app.js
|
||||
# optionally, a version constraint of the npm package
|
||||
# version: ^0.4.0
|
||||
# per-service config
|
||||
conf:
|
||||
port: 8888
|
||||
# interface: localhost # uncomment to only listen on localhost
|
||||
# more per-service config settings
|
||||
# the location of the spec, defaults to spec.yaml if not specified
|
||||
# spec: ./spec.template.yaml
|
||||
# allow cross-domain requests to the API (default '*')
|
||||
cors: '*'
|
||||
# to disable use:
|
||||
# cors: false
|
||||
# to restrict to a particular domain, use:
|
||||
# cors: restricted.domain.org
|
||||
# content for the CSP headers
|
||||
# csp: false # uncomment this line to disable sending them
|
||||
# CSP for mobile-html
|
||||
mobile_html_csp: "default-src 'none';
|
||||
connect-src https://*.isekai.cn 'self';
|
||||
media-src *.isekai.cn 'self';
|
||||
img-src *.isekai.cn 'self' data:;
|
||||
object-src 'none';
|
||||
script-src 'self' 'unsafe-inline';
|
||||
style-src *.isekai.cn 'self' 'unsafe-inline';
|
||||
frame-ancestors 'self'
|
||||
"
|
||||
# URL of the outbound proxy to use (complete with protocol)
|
||||
# proxy: http://my.proxy.org:8080
|
||||
# the list of domains for which not to use the proxy defined above
|
||||
# no_proxy_list:
|
||||
# - domain1.com
|
||||
# - domain2.org
|
||||
# the list of incoming request headers that can be logged; if left empty,
|
||||
# the following headers are allowed: cache-control, content-length,
|
||||
# content-type, if-match, user-agent, x-request-id
|
||||
# log_header_allowlist:
|
||||
# - cache-control
|
||||
# - content-length
|
||||
# - content-type
|
||||
# - if-match
|
||||
# - user-agent
|
||||
# - x-request-id
|
||||
# the user agent to use when issuing requests
|
||||
user_agent: WMF Mobile Content Service dev
|
||||
# REST API base URIs
|
||||
use_request_host: false
|
||||
mobile_html_rest_api_base_uri: '//www.isekai.cn/api/rest_v1/'
|
||||
mobile_html_local_rest_api_base_uri_template: '//www.isekai.cn/api/rest_v1/data/css/mobile/base'
|
||||
# max JSON POST body size limit
|
||||
# max_body_size: 100kb
|
||||
# the template used for contacting the MW API
|
||||
mwapi_req:
|
||||
method: post
|
||||
uri: https://www.isekai.cn/api.php
|
||||
headers:
|
||||
user-agent: '{{user-agent}}'
|
||||
accept-language: '{{accept-language}}'
|
||||
body: '{{ default(request.query, {}) }}'
|
||||
# the template used for requesting ResourceLoader module content from load.php
|
||||
mw_resource_loader_req:
|
||||
method: post
|
||||
uri: https://www.isekai.cn/load.php
|
||||
headers:
|
||||
user-agent: '{{user-agent}}'
|
||||
body: '{{ default(request.query, {}) }}'
|
||||
# the template used for contacting RESTBase
|
||||
restbase_req:
|
||||
method: '{{request.method}}'
|
||||
uri: https://www.isekai.cn/api/rest_v1/{+path}
|
||||
query: '{{ default(request.query, {}) }}'
|
||||
headers: '{{request.headers}}'
|
||||
body: '{{request.body}}'
|
||||
timeout: 60000 # 60 * 1000
|
||||
# whether to print extra debug info
|
||||
debug: true
|
Loading…
Reference in New Issue