Commit graph

66 commits

Author SHA1 Message Date
Hannu Lyytikainen
7177cb37c7 Pass base url to SDK only if provided 2018-11-28 10:07:03 +02:00
Kimmo Puputti
360a5a9a78 Update the Sharetribe Flex SDK to the 1.0.0 version in NPM 2018-08-07 13:08:35 +03:00
Mikko Koski
759844112a Use Transit Verbose mode in development 2018-04-12 16:28:16 +03:00
Kimmo Puputti
7add6815c6 Add more info to CSP error message 2018-03-20 11:06:07 +02:00
Mikko Koski
0c6cb3c950 Use http.Agent with keepalive set to true
Instantiate HTTP(S) Agents with keepAlive set to true.
This will reduce the request time for consecutive requests by
reusing the existing TCP connection, thus eliminating the time used
for setting up new TCP connections. The reduced response time can
be as much as 200ms.
2018-03-19 09:15:02 +02:00
Olli Vanhapiha
42aeefd487 Ensure PORT is an integer 2018-03-15 23:00:01 +02:00
Olli Vanhapiha
6380d7569f Harmonize client & server env handling
* Remove defaults from multiple places in code. Put them to .env-template instead
* Do not use imported config.js in server. Access process.env directly instead
* Instruct using .env for local development, not .env.development.local
2018-03-15 14:27:57 +02:00
Vesa Luusua
4e8f3597fa Use basic auth only if there're env variables set 2018-03-14 15:20:06 +02:00
Boyan Tabakov
7817979bb1 Add a simple static /_status.json page 2018-03-01 10:44:05 +02:00
Kimmo Puputti
4552a9cf29 Add Content Security Policy (CSP) middleware 2018-01-18 14:08:27 +02:00
Hannu Lyytikainen
85fbccb2fd Change to cleaner syntax for environment check 2017-11-17 15:10:13 +02:00
Hannu Lyytikainen
29160d6a45 Default to production environment 2017-11-17 14:49:26 +02:00
Hannu Lyytikainen
ce07746bee Add runtime environment variable
Add a variable that can be used to differentiate between dev, staging
and production environments.
2017-11-16 18:31:31 +02:00
Kimmo Puputti
e6f01befc6 Log server render info only in dev mode 2017-10-23 15:04:16 +03:00
Hannu Lyytikainen
2be909014f Add sitemap.xml and robots.txt files 2017-10-19 11:07:56 +03:00
Kimmo Puputti
90ab9c9a69 Format with latest Prettier 2017-10-13 10:11:51 +03:00
Kimmo Puputti
55eb4c1aac Merge pull request #467 from sharetribe/disable-response-caching
Disable response caching
2017-10-06 10:00:26 +03:00
Kimmo Puputti
32ff790277 Skip basic auth for static resources 2017-10-06 09:55:03 +03:00
Kimmo Puputti
0a2f3a4faa Disable HTTP caching for dynamic responses 2017-10-05 14:13:24 +03:00
Kimmo Puputti
f69570db7d Avoid rendering missing static assets through the React app 2017-10-05 14:12:50 +03:00
Vesa Luusua
48fa064118 Remove ENFORCE_SSL 2017-10-05 13:00:57 +03:00
Vesa Luusua
020c81103d Created a environment variable and using it when creating sdk instances. 2017-10-05 12:57:49 +03:00
Hannu Lyytikainen
de5ec59119 Add error codes
An error code can be passed to logger. This code gets added to the
Sentry error report as a tag and can be used to search this specific
error.
2017-10-04 13:17:43 +03:00
Hannu Lyytikainen
a75615707b Remove Sentry config from logger setup functions
The Sentry DSN key and environment are read from environment
parameters/config in the logger modules.
2017-10-04 13:16:28 +03:00
Hannu Lyytikainen
5bf9d0f072 Send errors to sentry 2017-10-04 13:16:28 +03:00
Hannu Lyytikainen
d46e4cdfc5 Return empty request and error handlers
In case Sentry is not set up, empty request and error handler functions
are returned instead of nulls.
2017-10-04 13:15:10 +03:00
Hannu Lyytikainen
1882e25d00 Equalize logger setup in server and browser
Set up logger in the server side with the same parameters as in the
browser and clean the environment variables out of the server/log.js
file.

Code commenting improved.
2017-10-04 13:15:10 +03:00
Hannu Lyytikainen
8a595eda4e Add Sentry integration for the server 2017-10-04 13:12:47 +03:00
Vesa Luusua
294e107c4f Read error page before request logic. 2017-10-04 11:27:23 +03:00
Vesa Luusua
992defa6c6 500.html added 2017-10-04 11:27:22 +03:00
Vesa Luusua
91251bd26c Send 200 or 401 from server side on auth=true pages 2017-10-02 17:19:11 +03:00
Kimmo Puputti
e8e923dd79 Update Node, Yarn, and backend related NPM packages 2017-08-04 11:20:51 +03:00
Mikko Koski
f265c72a55 Use line items to show price breakdown 2017-07-02 10:03:35 +03:00
Boyan Tabakov
e56583011e Move basic auth after SSL redirection 2017-05-17 14:54:10 +03:00
Vesa Luusua
67f8bd92e4 format with prettier 2017-05-16 23:00:36 +02:00
Mikko Koski
b796157c82 Fix message "Listening to port 4000 in undefined mode" 2017-05-15 16:51:39 +03:00
Mikko Koski
ec9d28ab07 Add ENFORCE_SSL config. Redirect to HTTPS if true. 2017-05-15 16:51:39 +03:00
Kimmo Puputti
5cb1219a97 Read API config from env in server 2017-03-23 12:53:36 +02:00
Kimmo Puputti
5a38f6c280 Call loadData of matched routes in the server 2017-03-15 15:51:40 +02:00
Kimmo Puputti
6f713ab281 Create SDK instance for each request 2017-03-15 15:51:40 +02:00
Kimmo Puputti
3ff726b02d Reorganise server code 2017-03-15 12:23:48 +02:00
Kimmo Puputti
00bfe79237 Remove old redux-saga data loading 2017-03-15 10:45:28 +02:00
Kimmo Puputti
ad3ceca9e8 Format with updated Prettier 0.19 2017-02-27 10:54:49 +02:00
Kimmo Puputti
48d6b3a3bd Add support for forbidden status in server rendering 2017-02-16 14:04:10 +02:00
Kimmo Puputti
2863f9dbef Fix notfound status code in server rendering 2017-02-16 14:03:23 +02:00
Kimmo Puputti
59748e39b9 Rename exactly to exact as in react-router Route props 2017-02-15 13:48:05 +02:00
Kimmo Puputti
3f4bc073d4 Fix routers and server context 2017-02-14 10:48:10 +02:00
Kimmo Puputti
be2fcdf793 Import from react-router-dom instead of react-router 2017-02-14 09:43:37 +02:00
Vesa Luusua
bc2baaf3b5 Refactoring to improve readability, compatibility with saga and comments 2017-02-07 13:13:08 +02:00
Vesa Luusua
b937f3fd57 Refactor saga code in ducks files and add sdk as parameter. 2017-02-06 12:40:47 +02:00