Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
e52951fd
Unverified
Commit
e52951fd
authored
May 01, 2023
by
Igor Stuev
Committed by
GitHub
May 01, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #793 from blockscout/ws-protocol
add variable for ws protocol
parents
bd516d97
3e609bec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
.env.template
.env.template
+1
-0
config.ts
configs/app/config.ts
+3
-1
ENVS.md
docs/ENVS.md
+2
-0
No files found.
.env.template
View file @
e52951fd
...
...
@@ -52,6 +52,7 @@ NEXT_PUBLIC_API_HOST=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_HOST__
NEXT_PUBLIC_API_BASE_PATH=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_BASE_PATH__
NEXT_PUBLIC_API_PROTOCOL=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_PROTOCOL__
NEXT_PUBLIC_API_PORT=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_PORT__
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL__
NEXT_PUBLIC_STATS_API_HOST=__PLACEHOLDER_FOR_NEXT_PUBLIC_STATS_API_HOST__
NEXT_PUBLIC_VISUALIZE_API_HOST=__PLACEHOLDER_FOR_NEXT_PUBLIC_VISUALIZE_API_HOST__
NEXT_PUBLIC_API_SPEC_URL=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_SPEC_URL__
...
...
configs/app/config.ts
View file @
e52951fd
...
...
@@ -45,6 +45,8 @@ const apiEndpoint = apiHost ? [
apiPort
&&
'
:
'
+
apiPort
,
].
filter
(
Boolean
).
join
(
''
)
:
'
https://blockscout.com
'
;
const
socketSchema
=
getEnvValue
(
process
.
env
.
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL
)
||
'
wss
'
;
const
logoutUrl
=
(()
=>
{
try
{
const
envUrl
=
getEnvValue
(
process
.
env
.
NEXT_PUBLIC_LOGOUT_URL
);
...
...
@@ -120,7 +122,7 @@ const config = Object.freeze({
api
:
{
host
:
apiHost
,
endpoint
:
apiEndpoint
,
socket
:
apiHost
?
`
wss
://
${
apiHost
}
`
:
'
wss://blockscout.com
'
,
socket
:
apiHost
?
`
${
socketSchema
}
://
${
apiHost
}
`
:
'
wss://blockscout.com
'
,
basePath
:
stripTrailingSlash
(
getEnvValue
(
process
.
env
.
NEXT_PUBLIC_API_BASE_PATH
)
||
''
),
},
L2
:
{
...
...
docs/ENVS.md
View file @
e52951fd
...
...
@@ -121,8 +121,10 @@ For each application, you need to specify the `MarketplaceCategoryId` to which i
| Variable | Type| Description | Is required | Default value | Example value |
| --- | --- | --- | --- | --- | --- |
| NEXT_PUBLIC_API_PROTOCOL |
`http \| https`
| Main API protocol | - |
`https`
|
`http`
|
| NEXT_PUBLIC_API_HOST |
`string`
| Main API host | - |
`blockscout.com`
|
`my-host.com`
|
| NEXT_PUBLIC_API_BASE_PATH |
`string`
| Base path for Main API endpoint url | - | - |
`/poa/core`
|
| NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL |
`ws \| wss`
| Main API websocket protocol | - |
`wss`
|
`ws`
|
| NEXT_PUBLIC_STATS_API_HOST |
`string`
| Stats API endpoint url | - | - |
`https://my-host.com`
|
| NEXT_PUBLIC_VISUALIZE_API_HOST |
`string`
| Visualize API endpoint url | - | - |
`https://my-host.com`
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment