Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
fix(setup): santizes canonical url
Browse files Browse the repository at this point in the history
santizes the canonical url to avoid duplicate slashes

fixes #165
  • Loading branch information
didimitrie committed Oct 2, 2019
1 parent dc7572d commit e0cba2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const logger = require( './config/logger' )

// load up .env
const configResult = require( 'dotenv' ).config( { path: './.env' } )

process.env.CANONICAL_URL = new URL( process.env.CANONICAL_URL ).origin

if ( configResult.error ) {
logger.debug( chalk.bgRed( 'There is an error in the .env configuration file. Will use the default provided ones (if any).' ) )
}
Expand Down

0 comments on commit e0cba2e

Please sign in to comment.