{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Developer Portal (Drupal-based) /
avatar image
1
Question by Pradeep Ande · Aug 12, 2016 at 06:07 PM · 191 Views SmartDocsdrupal rules

Smartdocs is adding additional header Referer to the request

When a delete transaction is sent out from Developer portal smart docs, we are getting an issue.

If we send the request from the postman, we don’t have any issue.

When a request is sent from developer portal, Referer header contains %7Breferenc%7D.

As per some of our policies to avoid SQL injection and other security issues, % is not allowed as part of the header.

Is there a way to remove the % from the URL path or from the body which is sent to the Edge APi.

Is there a way to disable the referer header from the request?

One option to have policy which will remove the "referer" header before the "Regular Expression Protection", but all the requests will have to execute this policy.

As the request is generated from Smartdocs, I am looking for a way.

Comment
Add comment Show 1
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sai Saran Vaidyanathan ♦   · Aug 12, 2016 at 11:47 PM 0
Link

Hi @Pradeep Ande

Can you share the Open API (Swagger) spec that was imported to the dev portal ? I would like to take a look at it and see if I can reproduce

Close

1 Answer

  • Sort: 
avatar image
0

Answer by Anil Sagar @ Google   · Aug 20, 2016 at 02:40 PM

@Pradeep Ande ,

Thank you for highlighting this issue. Did some research & i can able to reproduce same, It's due to the badly formed smartdocs developer portal URL that has been taken as the Referer value while making the smartdocs API call.

For Example, Take a look at this smartdocs URL, http://dev-4mv4d.devportal.apigee.com/petstore/apis/delete/user/%7Busername%7D

It's due to the smartdocs content type URL pattern setting, %7B & %7D refers to { & } html encoded characters. By this time you might have guessed the root cause.

Default pattern for smartdocs URL is ,

[node:field-smart-method-model:name]/apis/[node:field-smart-method-verb:name]/[node:field-smart-method-resource-path]

that means if resource path is dynamic parameter like /v2/user/{username} then url will contain encoded characters like above. to fix above issue, you can update the url pattern to something like below in "admin/config/search/path/patterns" page as Developer Portal administrator,

[node:field-smart-method-model:name]/apis/[node:title]

Once you save the settings, Either re-render the smartdocs / generate the url by editing the the smartdocs node using the "URL path settings" at the bottom.

Hope it helps. Keep us posted if any.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anil Sagar @ Google ♦♦   · Aug 20, 2016 at 02:41 PM 0
Link

@Chris Novak , @Daniel Johnson FYI

Follow this Question

Answers Answers and Comments

36 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I create a WADL for a POST with a mediaType of application/x-www-form-urlencoded? 3 Answers

Mixed Content error when loading documentation 1 Answer

Change the BASIC Security Scheme inputs 1 Answer

Display response property default values in smartdocs 1 Answer

Configuring smartDocs: What does the smartDocs Api Products/smartDocs Settings do? 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2019 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Members
  • Badges