We are using sunspot-rails to connect to websolr on Heroku. Websolr provides an authorization feature to protect read and update calls. This authorization feature requires three additional http headers to be present in every call to SOLR. I am trying to find out a way to add these http headers to every call going from sunspot. The following article shows how to do it for rsolr but not sunspot - https://github.com/onemorecloud/websolr-demo-advanced-auth. The official heroku doc at https://devcenter.heroku.com/articles/websolr has very little info about authorization. Is there a way to alter http headers through sunspot?
sunspot heroku websolr authorization
332 views Asked by anishdeena At
2
There are 2 answers
0
alf
On
I had to adapt @polmiro's gist a little bit to make it work: https://gist.github.com/alfonsocora/e1f979621bbfe98e10dc
Related Questions in HEROKU
- How to get Heroku Support to answer an email?
- Duplicate GET requests - Rails & Heroku
- I am struggling to get a 200 success request for my Heroku-hosted API on Rapid API for GET requests. I only receive a '404 page not found' error
- Heroku Deployment Error: Failed to Push Some Refs to Git Repository
- NOT WORKING domain.com/cv WORK domain.com/cv/ www.bluetrendy.com/cv www.bluetrendy.com/cv/ any ideas?
- I'm going nuts with Heroku session management issues
- Images stored on google drive are not loading on a website hosted on heroku
- Deploy Springboot app on heroku which is using google storage services
- How to run mitmproxy in Heroku?
- Celery Task Tracing ValueError: Unpacking Issue in a Flask Web App Migration, python backend
- Unable to push changes via git behind Proxy with Heroku
- Failed docker deployment: Cannot find module '/app/heroku'
- Request timeout error (H12) on Heroku deployment for website scraping and Excel generation
- Stripe doesn't work after deploying on Heroku by Django
- I got CORS error when trying to do a request in my app in Heroku
Related Questions in SUNSPOT
- Multiplicative boosts for categorical variable
- How to efficiently build Solr spellchecker
- After install and start Solr server I get error
- Sort sunspot solr dynamic fields on datatable
- How to add dynamic fields in searchable block Sunspot solr model level rails app
- Rails sunspot reindexing specific schema
- Can I continue solr indexing if an error occurs due to bad data instead of abort
- sunspot search assiocation using joins
- 413 Request is larger than 20 MB or headers are too large. websolr
- Rails application on production not able to connect to Solr server
- Unexpected Solr scores for documents boosted by the same boost values
- In Solr, how to sort documents differently based on their attributes?
- Filter association in search results using rails sunspot
- How to Add record in sunspot "search.results"
- What is the difference between open_timeout and read_timeout in sunspot
Related Questions in WEBSOLR
- 413 Request is larger than 20 MB or headers are too large. websolr
- Ignoring Solr in a Ruby Heroku app if Solr is inaccessible
- Websorl returns error " unknown field 'django_ct' " when building schema.xml
- How to remove Sunspot indexed data after removing model indexing?
- RSolr::Error::Http (RSolr::Error::Http - 429
- Rails app not picking up schema.xml change in production
- Invalid UTF-8 middle byte error when creating a document in WebSolr
- Solr Search with wrong spell
- How to boost Solr search results by document type?
- how to rank records dynamically in a result set in rails using sunspot solr
- How to quickly transfer data between servers using Sunspot / Websolr?
- Where is the websolr log files stored (when using Heroku)?
- Heroku - RSolr::Error::Http (RSolr::Error::Http - 404 Not Found
- Algolia vs Solr search
- Scheduling websolr reindexing using heroku scheduler
Related Questions in RSOLR
- Ruby 2.3.1 how to set the project root directory in config.rb
- rsolr not returning facet fields
- Why Solr match data and count mismatch while using group.limit?
- "Error: data should be 2 dimensional "while trying solr_facet
- Using Ruby variable in Rsolr requests
- which is better gem for solr cloud setup in rails 4.1 application for aws hosting,I had researched some gems as below
- Rsolr::Ext return undefined method `to_i' for ["10", "10"]:Array
- Rails 4 w/ Heroku RSolr::Error::Http (RSolr::Error::Http - 404 Not Found
- Rails rsolr 1.0.12 Errno::ECONNREFUSED depreciated, but why not working in production?
- How to soft-commit in Sunspot (Solr 4)?
- Using POST instead of GET for long queries in Sunspot / Solr
- Sunspot Solr Reindexing failing due to illegal characters
- Query solr cluster for state of nodes
- SSL Support for sunspot (solr) requests
- sunspot heroku websolr authorization
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can customize the connection class used in the Sunspot session. You have see an example in this gist: https://gist.github.com/nz/6243059