Skip to content

Commit

Permalink
fix: updates for print proxy v2
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Jul 16, 2024
1 parent 85d5b07 commit 16a1bbe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ UGRC's [base map services](/products/sgid/base-maps/) (including the [Google ima

### The Solution

To work around this issue, UGRC developed a [Google Cloud function](https://cloud.google.com/functions/) called [serverless-print-proxy](https://github.com/agrc/serverless-print-proxy). Our proxy service takes the same parameters as Esri's Export Web Map. When it receives a request, it swaps out any locked-down quad-words with wide open quad-words. Then it simply passes on the request to your Export Web Map service and passes back the response stripped of the wide open quad-words for security. You can read more about how we built serverless-print-proxy in [our blog post about it](/blog/2018-02-26-success-with-serverless/). To get started, you need to get your account added to [accounts.js](https://github.com/agrc/serverless-print-proxy/blob/master/accounts.js). You can do this by [submitting a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) or by contacting <Contacts inline subject={frontmatter.title} contactKey='print_proxy' />.
To work around this issue, UGRC developed a [Google Cloud function](https://cloud.google.com/functions/) called [serverless-print-proxy](https://github.com/agrc/serverless-print-proxy). Our proxy service takes the same parameters as Esri's Export Web Map. When it receives a request, it swaps out any locked-down quad-words with wide open quad-words. Then it simply passes on the request to your Export Web Map service and passes back the response stripped of the wide open quad-words for security. You may read more about how we built serverless-print-proxy in [our blog post about it](/blog/2018-02-26-success-with-serverless/). To get started, you may request an [account number](https://github.com/agrc/serverless-print-proxy/tree/main?tab=readme-ov-file#usage) by sending an email to [ugrc-developers@utah.gov](mailto:ugrc-developers@utah.gov).

_Why don't I just use a wide open quad-word in the first place?_ That's a great question. I'm glad you asked! Using wide open quad-words in web applications would violate the [Organizational Usage Agreement](https://docs.google.com/a/utah.gov/forms/d/e/1FAIpQLScL5uUQIvw7op_ZcF4bijxcoOMGhNF0MXwJNGqSXS6IbjbKhA/viewform). It would be very easy for a savvy web developer to get your quad-words and use them on their own site.

Expand Down
5 changes: 0 additions & 5 deletions src/data/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,6 @@ export const contacts: Contacts = {
email: 'SteveBowman@utah.gov',
phone: '801-537-3304',
},
print_proxy: {
name: 'Scott Davis',
agency: 'UGRC',
email: 'stdavis@utah.gov',
},
multimodal: [
{
name: 'Bert Granberg',
Expand Down
25 changes: 14 additions & 11 deletions src/pages/documentation/discover/problems.astro
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,20 @@ const page: IStandardPageMetadata = {
>. The locked-down links will not authorize requests from ArcGIS Online's domain and the layer won't export/print.
</p>
<p>
To work around this issue, we developed a <ExternalLink href="https://github.com/agrc/serverless-print-proxy">
print proxy</ExternalLink
>. The proxy accepts the same parameters as Esri's Export Web Map. When it receives a request, it replaces the
locked-down quad-word with a wide open quad-word. Then it forwards the request to the Export Web Map service and
passes back the response stripped of the wide open quad-words for security. You can read more about how we built
print-proxy in <a href="/blog/2017-02-02-printing-web-maps-with-discover-services/">our blog post about it</a>. To
get started, you need to get your account added to <ExternalLink
href="https://github.com/agrc/serverless-print-proxy/blob/master/accounts.js">accounts.js</ExternalLink
>. You can do this by <ExternalLink
href="https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request"
>submitting a pull request</ExternalLink
To work around this issue, we developed a proxy service called <ExternalLink
href="https://github.com/agrc/serverless-print-proxy"
>
Print Proxy</ExternalLink
>. The proxy acts as a middleman between your application and any Esri-compatible print service. When it receives
a request, it replaces the locked-down quad-word with a wide open quad-word. Then it forwards the request to the
Export Web Map service and passes back the response stripped of the wide open quad-words for security. You may
read more about how we built Print Proxy in <a href="/blog/2017-02-02-printing-web-maps-with-discover-services/"
>our blog post about it</a
>. To get started, you may request an <ExternalLink
href="https://github.com/agrc/serverless-print-proxy/tree/main?tab=readme-ov-file#usage"
>account number</ExternalLink
> by sending an email to <ExternalLink href="mailto:ugrc-developers@utah.gov"
>ugrc-developers@utah.gov</ExternalLink
>.
</p>
</Section>
Expand Down

0 comments on commit 16a1bbe

Please sign in to comment.