Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8383091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:04:40+00:00 2026-06-09T17:04:40+00:00

Is there any way to have a reverse proxy using http basic Authentication in

  • 0

Is there any way to have a reverse proxy using http basic Authentication in front of a REST API which also uses http basic Authentication with different username and passwords?

The reverse proxy is Apache, if it matters.

The most obvious solution seems to be to get the application and the proxy to use different headers for the authentication.

1) For example, I could send a request to the proxy like:

GET /foo/1 HTTP/1.1
Authorization: proxyuserpasshere
X-Passthru-Authorization: restuserpasshere

And then the proxy would consume the “Authorization” header and (if it were valid) pass on a request to the underlying web-app like:

GET /foo/1 HTTP/1.1
Authorization: restuserpasshere

(where the value ‘restuserpasshere’ was taken from the ‘X-Passthru-Authorization’ header)

Is there a way to configure Apache to make that work?

2) Conversely, I could use the standard “Authorization” header for the proxy, and use a custom header for my application’s authentication. So the request would look like:

GET /foo/1 HTTP/1.1
Authorization: proxyuserpasshere
X-Myapp-Authorization: restuserpasshere

The drawback to this is that my app is now hardcoded to use the “X-Myapp-Authorization” header instead of the standard Authorization header.

Is there a better way around this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:04:41+00:00Added an answer on June 9, 2026 at 5:04 pm

    Not tested, but I would try something like:

    RequestHeader set Authorization %{HTTP:X-Passthru-Authorization}
    

    I don’t know if %{HTTP:x-HEADER} syntax is allowed. You may have to play with environment variables.

    See:

    http://httpd.apache.org/docs/2.2/mod/mod_headers.html

    http://php.dzone.com/news/inserting-variable-headers-apa

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to have a template inherit another template? I'm not using
I have a file which is UPX packed. Is there any way I can
Is there any way to have a label wordwrap text as needed? I have
Is there any way to have to tabcontrol take the size of the largest
Is there any way to have a default MessageBox.Show() caption? Let says I would
Is there any way to have a code that opens a PDF file in
Is there any way to have this: [one[two]][three] And extract this with a regex?
In WPF, is there any way to have the Text property of a TextBlock
In an application that has multiple webviews, is there any way to have the
Is there any way I can have a thread branch off into its own

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.