Skip to content

Commit

Permalink
fix(functions): fix mappings to work with function rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Oct 31, 2024
1 parent 5cd5217 commit 803632b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ const options = {
verbose: !!process.env.FIREBASE_FUNCTIONS_EMULATOR,
mappings: [
{
from: /^\/toolbox/,
to: '/arcgis/rest/services/Electrofishing/Download/GPServer',
// the optional /maps prefix is to support the maps rewrite rule in firebase.json
from: /^(\/maps)?\/toolbox\//,
to: '/arcgis/rest/services/Electrofishing/Download/GPServer/',
secrets: 'ARCGIS_SERVER_CREDENTIALS',
},
{
from: /^\/feature/,
to: '/arcgis/rest/services/Electrofishing/MapService/FeatureServer',
from: /^(\/maps)?\/feature\//,
to: '/arcgis/rest/services/Electrofishing/MapService/FeatureServer/',
secrets: 'ARCGIS_SERVER_CREDENTIALS',
},
{
from: /^\/reference/,
to: '/arcgis/rest/services/Electrofishing/Reference/MapServer',
from: /^(\/maps)?\/reference\//,
to: '/arcgis/rest/services/Electrofishing/Reference/MapServer/',
secrets: 'ARCGIS_SERVER_CREDENTIALS',
},
],
Expand Down

0 comments on commit 803632b

Please sign in to comment.